Questions tagged as 'python'

2
answers

How to print text in the same line in Python

list = open("list.txt", "w") list = list.readlines() for i in list: print i I wanted to print i on the same line without getting down, type replacing the current word     
asked by 26.05.2017 / 20:14
1
answer

I can not extract data from a specific column

My DataFrame has multiple columns and one of them is not being read when I try to use indexing (eg bar_0617 = media_0617 ['Bar']). The following error appears: KeyError: 'Bar'. I do not know what to do, I already checked the file with my data an...
asked by 16.12.2018 / 03:15
0
answers

Renaming files with Python, adding numbering dynamically

I have a directory with many pdf lists, and I want to rename the files dynamically. Ex: ~/teste/ |__ProjMed-Química-Físico.Química-quimica_propriedades_coligativas_exercicios.pdf |__ProjMed-Química-Físico.Química-quimica_termoquimica_enta...
asked by 15.12.2018 / 19:55
0
answers

Pass parameter by subimit and update the form

Hello, I am installing a parking system where the checkin is done automatically, at the time of registration it picks up the current time and date, and when I click on update it has 3 buttons, save, delete and checkout, and I wanted it when I cli...
asked by 05.12.2018 / 22:17
1
answer

Menu in the Tkinter Python module

Hello, I have a screen that was made in Tkinter and I have a menu with cascading submenus, what I need to do is show the different submenus information without having to create several other screens using functions. It's possible? If yes, how? H...
asked by 06.12.2018 / 02:29
1
answer

How to eliminate noise in an image?

In relation to the image presented, I want to leave only the main trunk and branches (secondary) of the plant (tomato) very visible. Asaresultofmyattempts,whatseemstometobethemostencouragingresultsisthereductionoftheimagearea,followedbytheCa...
asked by 06.12.2018 / 01:46
0
answers

execute python script in google cloud VM

I created a vm in google cloud to run a script (bot) but every time I close my terminal the script is interrupted for no apparent reason. The code itself has a while True with a conditional in the middle to create a delay; whi...
asked by 16.12.2018 / 18:26
1
answer

Django: PostgreSQL local and in Heroku?

I'd like to use PostgreSQL locally and in Heroku. How do I set my settings.py to know which setting to use? I have tried to put it as an environment variable, but I still can not. Today I have this: #Conectar localmente no sqlite def...
asked by 05.12.2018 / 21:14
0
answers

How to save the output result of a Python script to a txt file?

Script showing saved wifi passwords: import subprocess data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors="backslashreplace").split('\n') profiles = [i.split(":") [1] [1:-1] for i in data if "Todos os...
asked by 05.12.2018 / 01:18
1
answer

How to write a tabular file in an instance of the Azure Data Lake Store with the Python API?

Suppose I have an instance of the Data Lake Store in my Azure subscription and I'd like to create a Python script to write a tabular file with a separator (of type CSV or similar) in that instance. Without considering the Spark API, how can I...
asked by 04.12.2018 / 22:38