Questions tagged as 'python'

1
answer

Txt manipulation - Separate blocks based on a pattern

I have a txt with some information. The txt follows the following pattern: 1 - Starting block 2 - Information 3 - Description of line 2 So, for example 190845 3890580235203895 0329045832854880328 58908349058340534859 hjdfhgjdfhg dg...
asked by 08.05.2017 / 15:56
2
answers

How to configure the Django environment and keep the settings?

Hello, I'm starting to learn Django and well part of the material teaches to do the setting of Environment with Virtualenv. But I'm having a lot of trouble configuring the System. First, I use a Macbook Pro with Sierra OSX. Second, I have alr...
asked by 18.05.2017 / 05:31
1
answer

Format Excel output - Python

I transform a list into a Dataframe and send it to an Excel, it's working fine. Here is the code: Df = pd.DataFrame(Lista, columns = colunas_geradas) writer = pd.ExcelWriter('Exemplo.xlsx', engine = 'xlsxwriter') Df.to_excel(writer, sheet_nam...
asked by 17.05.2017 / 16:55
1
answer

Error trying to download zip from BMF with python

I'm trying to download BMF zip files at a time ( ftp://ftp.bmf.com.br/ But there is an error in the program that does not find the file, but it does exist. follow the code: from io import BytesIO from urllib.request import urlopen from zipf...
asked by 12.04.2017 / 00:34
1
answer

Error installing React Native

I'm trying to set up the react native environment on my computer. Get install choco package manager. But when I try to install python2 with the command: choco install python2 this error message appears: I'm using windows 10 64 wi...
asked by 11.04.2017 / 15:52
1
answer

Ignore file with Python

I'm developing a client that le .JSON files and sends them to an API. The files are periodically deposited into a folder. However, what I want is that when an error occurs with the file (file being used, file with syntax error, etc...
asked by 13.04.2017 / 17:24
1
answer

Error installing applications in relation to Python in Ubuntu 17.04

I'm trying to put django, I've done all the process and everything, but when I do pip install django or other things related to python, marcos@MarcosViana:~$ sudo apt-get -f install Lendo listas de pacotes... Pronto Construindo árvore de depe...
asked by 16.05.2017 / 06:47
1
answer

Difference between maxiter and maxfun parameters in function fmin_l_bfgs_b

No function help : maxfun : int Maximum number of function evaluations. maxiter : int Maximum number of iterations. But what is the maximum number of iterations and the function evaluation number? For me, the number of iterations was di...
asked by 03.05.2017 / 14:54
0
answers

How to send value of a variable to a server?

What I have: def Enviar(): Enviar1 = self.Txt3.get() clientsocket = socket(AF_INET, SOCK_STREAM) clientsocket.connect(('localhost', 50000)) clientsocket.send b'(Enviar1)     
asked by 01.04.2017 / 20:36
2
answers

How to convert a list to string and vice versa?

I have a list: ('47075', 'josenestle', 'i need help') I do str1 = str (list) and I have it in string. However if you do list (str1) I do not retrieve my list. I can not find an obvious solution, help would be very grateful.     
asked by 30.04.2017 / 11:31