Questions tagged as 'python'

2
answers

Windows without borders in pyqt5

I managed to remove the borders from my main window but now I can not move it with the mouse. This is what I used for it: self.setWindowFlags((Qt.FramelessWindowHint)) How can I move it again without the edges?     
asked by 12.08.2016 / 07:52
2
answers

Matrices in Python

I have a question with the creation of matrices in Python, specifically with the following code: def inicializaMatriz(FILAS,COLUMNAS): matrizA = [] for i in range(FILAS): a = [0]*COLUMNAS matrizA.append(a) return ma...
asked by 06.08.2016 / 23:58
2
answers

Rename python file

Does anyone know how to rename a file with Python? What I do is that I finish the read function and then I call the other function to make it known. There is no way to do both at the same time, it tells me that another process is using the fi...
asked by 23.07.2016 / 13:55
1
answer

Store large hours in python

I have a variable in a table of my model that is called duracion that is of type TimeField , there I will store the total duration of the calls, both in hours, minutes and seconds, that a person makes in a period of time. The proble...
asked by 04.06.2016 / 17:51
2
answers

Remove quotes from the output of a list

I would like to present a problem that came up with the outputs of a list in python, the fact is that I am doing a program that runs through the directories of a PC, by getting the first list of directories (The one that is available from the fi...
asked by 03.04.2017 / 23:02
2
answers

How do I code a string in json with php?

hi all I need is to encode a string that is in json format in python is something like this: def queue(self, url, api_user, api_pass, api_version): args = urllib.urlencode({'cmd': 'api_queue_sms', 'username': api_user, 'password': api_p...
asked by 03.04.2017 / 17:47
1
answer

Field type Date Field in python?

I have a table that has a date field that only collects the date. My question is how to specify the format in which that date will enter. If this is the 01 MAR 2016 format, how do I specify it is day, month and year? Example : fe...
asked by 20.05.2016 / 21:06
1
answer

Error loading heroku on django

I have a problem regarding django with heroku, I already perform the whole process in the correct way, but when loading the page I get the Application error view, I go to the logs, and I do not understand where the error is, or how to correct it...
asked by 30.03.2016 / 21:14
2
answers

I have a project with several app and it is giving me "ProgrammingError: relation" auth_user "does not exist»

I have a project with several app and you are giving me this error    django.db.utils.ProgrammingError: relation "auth_user" does not exist I've already tried putting    python manage.py migrate       python manage.py makemigrate...
asked by 24.05.2016 / 19:27
1
answer

How to list files in a folder where there is a specific file with python

I would like to know how I can with pyhton list all the files in a folder that contains a specific file so that if that file is moved to another folder I list the files of the new folder where it is located. Thanks!     
asked by 02.05.2016 / 14:36