Questions tagged as 'python'

1
answer

Problem with eventFilter and Key_Return in a QDialog with buttons

I have the following code where I try to use eventFilter : class Ticket(QDialog): def __init__(self): QDialog.__init__(self) uic.loadUi("ticket.ui",self) self.D_Aceptar.clicked.connect(self.productos) #QPushB...
asked by 30.07.2018 / 20:00
3
answers

Consultation of two Models in Django

I have these two models: class Pacientes(models.Model): nombres = models.CharField(max_length=50) apellidos = models.CharField(max_length=50) numero_identificacion = models.CharField(max_length=10) fecha_nacimiento = models.DateField(blank=Fal...
asked by 05.07.2018 / 22:03
1
answer

Sum of a sequence using recursion

The idea of the code is to take a function with the following parameters: start , stop , step . start indicates the first number, stop the last and step the difference between each number and the idea is t...
asked by 28.06.2018 / 18:55
1
answer

Error with pd.DataFrame.replace, can not convert unicode string to float

I am trying to multiply a data frame by reference so I am using a dictionary to multiply it. When I try to fill my dictionary with the values in Excel rows I can not convert the values to float since they are unicode. I am using Python 2.7.10, c...
asked by 01.07.2018 / 00:50
1
answer

problem with an error counter list index out of range in python

hi I'm trying to make a for to iterate a list called coding the size (l) the problem is that I get the following error and I tried to solve it with the use of while but nothing: / follow the error, I understand that it is by the size of the list...
asked by 30.06.2018 / 21:55
1
answer

Filter dataframe from a tuple

I have the following dataframe (df2) Nombrearchivo Numero PosicionRegistro 20161020_113502_131221557378544949.jpg 208-13567 588 20161020_113448_131221555449704589.jpg 208-1356...
asked by 14.06.2018 / 21:10
1
answer

Execute sqlite3 operation in python before displaying data in a QTableView

Good evening community. I have a query in sqlite3 that I made in the Sales table which is the following: import sqlite3 fecha ="12/08/2018" conexion = sqlite3.connect("Users.db") cursor = conexion.cursor() cursor.execute("SELECT * FROM...
asked by 24.08.2018 / 05:09
1
answer

Incompatibilities in search engine on a Tkinter Text and show counter

Starting with code of a response (set by me) to a of my questions, I have come to improve the panel code finder introducing certain improvements and functions (that as you type the new term and search, replace action, keyboard shortcuts,...
asked by 16.06.2018 / 21:11
1
answer

How to change a text dynamically in kivy, python from a thread

I am trying to change the text of a stringProperty from a thread but I do not know how to access the string property from the thread This is the thread: def worker(): dev = InputDevice('/dev/input/by-id/usb-Logitech_USB_Keyboard-event-k...
asked by 11.06.2018 / 13:10
1
answer

Set within an Entry the selected content in a Text

I am finishing to implement a typical search engine in a text editor. The call to open the search panel can be made from the available menu option "Search> " or with the key combination "CTRL + F". Calling the search engine is when you bui...
asked by 11.06.2018 / 13:19