Questions tagged as 'python'

2
answers

hook pulls me out of the loop while it helps

Hello, someone can help me with this, they told me, but I do not know how to solve it yet: Client: import socket import pyHook,pythoncom,sys,logging import threading servidor = "127.0.0.1" puerto = 39421 def OnKeyboardEvent(event): try:...
asked by 07.08.2016 / 19:02
4
answers

Graph data from an excel spreadsheet with Python

I wanted to make a graph of the data I have in an excel using python. In the first column of the excel I have time values (x axis), and in the other columns values of inensity (y axis) for each time. From what I've read, I can use openpyxel t...
asked by 06.10.2016 / 18:26
2
answers

Admit letters and spaces in Python

I have a program that registers first and last name and I have a filter so that characters that are not letters are not allowed, but the space, since it is not a letter, does not support it and I can not put the last name. Does anyone know ho...
asked by 03.12.2016 / 06:05
1
answer

Python 3.x: ImportError: can not import name 'scandir'

I'm trying to use the scandir module and it gives me the error: ImportError: can not import name 'scandir' . I do not understand, it is assumed that the version I am using, 3.4.4 already has this module implemented. Does anyone have any idea ho...
asked by 06.12.2016 / 13:56
1
answer

Text string matches in Python 3

Dear, does anyone know a method to find non-exact matches between strings of text? For example: I have the following text "STATUS MSG PACK ACM L" (column 1) and should return "PACK L" (column 2). I have 2 lists, one written by a person...
asked by 27.07.2017 / 15:57
1
answer

Problem with self-calculated fields in a table

I have this table: db.define_table('cotizaciones', Field('numero_ticket', 'reference tickets'), Field('numero_cotizacion', 'string'), Field('fecha_registro_cotizacion', 'date', default=now),...
asked by 28.01.2016 / 18:35
2
answers

Create objects with similar names with a for cycle in python

I want to create 24 matrices like this: import numpy as np tabla1 = np.empty((25*5,3 + 11)) tabla2 = np.empty((25*5,3 + 11)) . . . tabla24 = np.empty((25*5,3 + 11)) To avoid having to write it 24 times, I thought about using a for...
asked by 06.04.2017 / 00:21
2
answers

Attempt of Eratosthenes sieve in python

Hi, I'm trying to make a code using the Eratosthenes Screen method but I get confused in the part of multiplying and eliminating the number that is not prime, the teacher says we should use a del or something to eliminate the number what is in t...
asked by 19.10.2018 / 05:32
1
answer

why do these pieces of code not work when I put or?

I made a program of stone paper and scissors. Everything works well (except when I want to add the option of 'scissors' or 'scissors' as an answer) I want you to accept both options as an input. #(esta es una version simplificada de mi codigo,...
asked by 14.10.2018 / 21:53
1
answer

Install Python 3.x package without internet

It's not a code question, basically I could not find something similar to this. I did a development in Python that I must run on a desktop computer, but the problem is that that computer does not have an internet connection and I need to have...
asked by 20.08.2017 / 03:23