Questions tagged as 'python-3.x'

1
answer

Python Connect Sql With user and "token"

I have an application in Flask and I'm using SQLAlchemy to get access to SQL Server. I would like the connection to the database to be made by a generic user and the password is a "token", I thought it would only replace the parameters but no...
asked by 29.08.2018 / 19:56
1
answer

Convert Python to exe

I have an app made in python that pulls several imports, and my client does not want to install Python in their environment (because it is an Oracle server), the output I found was to create an .exe, however when I I do not know how to do this,...
asked by 20.07.2018 / 21:40
1
answer

Why does this error of name 'sys' is not defined?

Why does this error occur with name 'sys' is not defined ? while True : print ('Digite exit para sair') response = input () if response == 'exit': sys.exit() print('Você digitou' + response + ',') /data/data/...
asked by 24.06.2018 / 20:41
2
answers

Block if not well located, how to solve?

I did it, by the way it is giving error, because port 80 is open and it returns as closed import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server = '201.27.188.138' port = '80' def MeuScanDaorao(port): try: s....
asked by 21.06.2018 / 14:45
1
answer

Error finding the center of an OpenCV Python object

Hello, I'm studying opencv to use in a drone and while I was implementing a code from a tutorial that detected objects and drew a circle in the center of it, and for that you should get half the dimensions x+w and y+h only the probl...
asked by 19.06.2018 / 23:14
1
answer

Pandas: Create Multiple Columns in the DataFrame

I have a spreadsheet with the following information: NUM_LEGISLACAO DSC_URL ... COD_TIPO DSC_TIPO 0 323/1895 NaN ... 2.0 CONCRETO 1 2.269/1896 NaN ... 2.0 CONCRETO 2 2....
asked by 27.05.2018 / 00:23
1
answer

Circular import

A doc of Flask, although it uses in its examples, it alerts to the bottom of the page about the bad practice of using circular imports. Another thing that bothers me is to create "global objects" within a __init__.py file. What would...
asked by 03.07.2018 / 17:27
1
answer

Selenium + Python error when using time.sleep ()

I'm automating a task on a website using python + selenium. Every time I use time.sleep() will run sleep time it returns this error. ConnectionAbortedError: [WinError 10053] Uma conexão estabelecida foi anulada pelo software no computa...
asked by 29.06.2018 / 20:18
1
answer

Get input value

Hello, I would like to know how to get a value from an input of a page after performing a curl with requests in python 3.6! Example: <input type="hidden" name="authURL" value="1526610106833.UG2TCP2ZiJ9HKXhlrlgybcdEBB0=" data-reactid="37"...
asked by 18.05.2018 / 04:24
1
answer

I can not get the input value "csrfmiddlewaretoken"

I can not get the value of the input "csrfmiddlewaretoken" from this link, could anyone help me? "The script would basically have to visit the page that is in the code and return the value of the input whose name is" csrfmiddlewaretoken "in the...
asked by 18.05.2018 / 17:13