Questions tagged as 'python-3.x'

0
answers

How to read a csv file with accented characters and transfer this data to a dictionary?

I have a csv file separated by ";" with two columns exported via excel: 1) Person's name 2) the person's email. However, the name contains accentuation and when trying to read the file and create the dictionary, python 3 (in macOS) give...
asked by 18.03.2018 / 13:32
1
answer

Is there any way to create different tables in SQLITE3 through the same python function?

I'm creating a bot in python through the python-telegram-bot library, and it works through commands. I know that through cursor.execute () I can create a table via python, but the real question is: is there a way to create different tables every...
asked by 18.03.2018 / 14:28
0
answers

Query url of an NFCe with Python

I do not know if what I want to do is possible. I'm capturing the url of an invoice contained in the QrCode of it. In the case of my example, the url is more or less as follows: link It happens, however, that if I run a get, via python I...
asked by 20.03.2018 / 01:13
2
answers

Problem with python in using .join

I need to print a MAC address, with ':' tab, but I can only print the address with the tab for each string in the string, with the MAC address separating every 2 boxes.     
asked by 20.03.2018 / 14:53
2
answers

problem UnboundLocalError: local variable 'num' referenced before assignment

def fnum_aleatorio(a, b, m, semente=None): if semente != None: num=semente num_aleatorio = (num*a+b)%m if num_aleatorio <= a//2: return 0 else: return 1 I'm trying to do a function that has a final...
asked by 24.03.2018 / 20:13
0
answers

The best way to use getters and setters

I started to study programming recently and the language chosen was Python. And I'm finding it very difficult to enter the use of getters , setters and properties. In my web surfing, I found that using property is more rec...
asked by 24.03.2018 / 21:28
0
answers

Is there a pro pycharm library that can handle gpu?

In case I wanted to process a calculation using my gpu, however, I did not find anything. Would I have another way? I'm doing a mining in python and I want to use my gpu to perform the calculation. Preferably a library that works with AMD     
asked by 24.03.2018 / 16:51
0
answers

Server-to-client communication

Hello, I'm starting programming now, and in networking class I need to create UDP and TCP communication between client and server in Python. I have achieved continuous communication of UDP client and server, with only the server sending messages....
asked by 13.03.2018 / 22:36
0
answers

Python 3.x TKInter filedialog does not return the extension chosen by the user

Hello: I'm developing a GUI with TKInter where the user needs to enter a filename to save data. This file name can be from some specific extensions. When the user opens the dialog to inform the name of the file (with tkinter.filedialog) an...
asked by 06.03.2018 / 13:33
1
answer

Check the relationship of two objects in a list

I need to extract from pure text the total value of an agreement. I have hundreds of documents with some values, and I realized that usually the highest value is also the total value of the agreement, but in some cases, not. def ata_values(tex...
asked by 06.03.2018 / 12:56