Questions tagged as 'python'

1
answer

Use kivy urlRequest

How exactly do you use kivy's UrlRequest? In case I wanted to download a page that returns a json file. Using the python requests library I can do this easily, however at the time of running the application on the android mobile phone, it gets m...
asked by 31.12.2017 / 01:33
1
answer

Threaded Exceptions in Python

I am in doubt in a situation not so common but that I have seen some developers use that is the case of concatenation of exceptions. I read the Python documentation about them but it was not as clear as Python acts behind the wipes in order t...
asked by 04.04.2018 / 18:10
3
answers

Check the line containing a string inside a TXT file

I need a help with a program that reads a file and responds in which line it contains a string inside it. Example I have a .txt file and inside it I have 5 lines: File.txt: arroz batata feijão carne laranja I need the program t...
asked by 01.04.2018 / 15:15
1
answer

How to change column type in pandas?

Please in Python 3 and Pandas, I want to change the type of a column from a CSV file. I used this command: cand_doacoes ['CPF_CNPJ_doador'] = cand_doacoes.CPF_CNPJ_doador.astype (int64) But the error appears: NameError Traceback (most r...
asked by 04.10.2017 / 15:40
2
answers

How can I use the results of one function inside another in python

Good afternoon, I'm studying python alone and I'm trying to do a little program with lists and functions, the program it will get 10 names and store in a list, then 10 notes and store in another list, so far so good, the problem is that I can no...
asked by 30.09.2017 / 16:41
1
answer

method overload sort

Studying polymorphism in python. I'm trying to overload the sort method of the class list that was inherited by my class group. It turns out that the planning is not working out right. I do not think the problem is the sort algorithm. It has to...
asked by 09.10.2017 / 15:12
1
answer

How to suspend a command without disturbing commands that are active

I would like to know if you know a command in python that suspends the operation of a command (for a few seconds) without disrupting the other commands that are active, since I wanted to make a rental system but time.sleep the other commands wor...
asked by 02.11.2017 / 01:19
1
answer

Mounting table from a csv, grouped per week, with python and pandas

I'm using pandas and I open the following table using the code tst = pd.read_csv('Iteracao.csv',delimiter=",") I'mtryingtogroupasfollows,whereweek1istheweekofthedate2017-02-10/2017-02-16,followingthelogicfortheotherweek,theindexdoesnothave...
asked by 20.08.2017 / 04:16
2
answers

generator

Well, I've been trying to optimize my code and found generator expressions, but I do not understand anything about it. For example: for mCp in mWithoutNone: for ctt in moradasCTT: if mCp[3] == ctt[3]: mWithCp4.append...
asked by 05.07.2017 / 13:49
1
answer

Python wordlist generation problem (2.7)

I'm trying to write a python script that takes n keywords and a number as input. This number will be my maximum range of the string that will be written in the wordlist. 1 ° Problem: You have to make as many combinations as possible between t...
asked by 29.06.2017 / 21:44