Questions tagged as 'python'

1
answer

How can I get the value of a database field by means of a model in Django?

Good afternoon friends of stackoverflow. I have the following question as to how I can obtain the value of a field by means of a query in a model of a database please. Here is the code. Views.py class UserFormView(View): form_class =...
asked by 28.12.2017 / 05:08
1
answer

Is there any way to skip a captcha on a scheduled task?

It has given me the doubt that if in python with selenium it could be skipped or avoided, a captcha. Those that validate if you are a robot or not. Before, these validations seemed foolish to me, since being a programmer, I find it inco...
asked by 03.01.2018 / 20:28
3
answers

do a json of two directories in python

I hope you can help me, I have two directories that I want to join and make a json but I'm not staying. I put down what I am using. import json uno = { 'NoSol': '1192017', 'idDocumento': '4fd174c8-3439-4c80-9b1c-1c3e6721f827', 'St...
asked by 04.01.2018 / 18:56
0
answers

Sort Leaves in xlsx

I have xlsx with three sheets and a code to sort them but I want to sort them in my own way and not by name: import xlsxwriter workbook = xlsxwriter.Workbook('test.xlsx') sheet_names = ['Data1', 'Chart1', 'Data2', 'Chart2', 'Data3', 'Chart3'...
asked by 12.01.2018 / 15:54
0
answers

Problems with foreign key when entering new records

Help please, I am trying to enter data to a table Empleadnom with 2 foreign keys of two other tables, the creation has no problems, with this code: eng = create_engine("mysql+mysqldb://root:000@localhost:000/bdnomprueba2", echo=True) Bas...
asked by 12.01.2018 / 16:57
1
answer

Arguments python as a string

I'm stuck in a script. I try to expose you to see if you can help me. I define the following before entering the loop.    client, date, time, state, name, result, most_repeated = sys.argv [1] .split ()       timestamp = str (date) + '' +...
asked by 08.01.2018 / 15:51
1
answer

Variable within another Python variable

I need to know if there is a certain text within my variable content, for example: content = <!DOCTYPE html> <html> <head> <meta http-equiv="expires" content="mon, 27 sep 2018 14:30:00 GMT"> <title>Peri├│dico am...
asked by 27.12.2017 / 00:31
0
answers

How can I display the data of my mysql table in a TKinter List text in Python 2.7?

I am trying to develop a graphical interface for my MySQL database with Python 2.7 TKinter. I was checking the tkinter documentation as well as other sources but I can not get the records in my table to be displayed inside the list box instead o...
asked by 20.12.2017 / 21:50
1
answer

Error compiling .py with pyinstaller

Hi, I am trying to compile a .py file with pyinstaller (previously probe with py2exe as well) using the console command: "pyinstaller.exe --onefile --windowed name.py" and when the process finishes, the corresponding .exe file is generated, but...
asked by 20.12.2017 / 16:55
0
answers

CSV with; Python

I have a problem with a CSV that is separated by ; and not by , as usual. I made my code a while ago and it works with CSV separated by , , and I want to convert it (the code) to values separated by ; or...
asked by 20.12.2017 / 16:06