Questions tagged as 'python'

1
answer

Buy list values

I'm having a problem with a list. I have a txt with some information (log failure of a system) and I wanted python to print to me these faults with the "translation" of them example: If cod_erro == '1':    print ('Invalid password') and...
asked by 11.07.2018 / 19:43
1
answer

Select the two largest values of a vector and add them?

atletas = [] while True: nome = input("Nome: ") if not nome: break saltos = [] for i in range(3): salto = float(input("Distância {}: ".format(i+1))) saltos.append(salto) atletas.append({ "nome": no...
asked by 12.06.2018 / 23:24
1
answer

Use of the comma in Python [duplicate]

I'm having a problem understanding the difference between code 1 and code 2 (Fibonacci sequence). Apparently it looked the same, but the results they both print are distinct. Code 1 qtd_elementos = int(input()) inicio = 1 somador = 0 list...
asked by 13.06.2018 / 08:49
1
answer

Python - How to make a packet logger from a server?

Python - How to make a packet logger from a server? Hello, I was wondering how do I create a packet logger in python that would have the following functionality: Receiving information from the game server, Example : I clicked on a butto...
asked by 02.06.2018 / 19:46
1
answer

Two doubts about tkinter

I have two doubts about the Tkinter GUI. The first is: how do I do when the text of a label is greater than the size of the label, rather than being missing, continue on the next line. The second would be how to make label texts that have "\ n"...
asked by 31.05.2018 / 21:51
1
answer

Sort TXT lines in numerical order

I need to invert all the columns of my txt file, using python. Txt file (example): Regra n10 - exemplo Regra n9 - exemplo Regra n8 - exemplo Regra n7 - exemplo Regra n6 - exemplo Regra n5 - exemplo Regra n4 - exemplo Regra n3 - exemplo Regra n...
asked by 29.05.2018 / 16:22
1
answer

Arrays in python

I have to make a program that receives an array of letters a number of words to be searched in the array and the words themselves, for example: u l i o a e a p b e a r y l s j i t u a e e h u b e u o r r c t n e p b i o s b 1 pytho...
asked by 27.05.2018 / 05:05
2
answers

UnicodeError problem when trying to save a figure with latex text in Matplotlib

Speak up. I am having a problem using the MatPlotLib library. Before the last update of Windows I used the library without any problem. I use it basically to create function graphs and save them in .pdf using Latex formatting for text, below is...
asked by 27.05.2018 / 19:59
1
answer

I can not write information to the database (PYTHON \ MYSQL)

I am trying to insert this query, but it does not register in the MySql table, but I realize that it is accessing right, because it always uses a position of the 'cod' that is primaryKey * When I use the string in the SQL database it inserts...
asked by 27.05.2018 / 21:54
1
answer

Language for Backend and another on Frontend?

I have a desktop program with no GUI working in Python, I would like to add a GUI using another language mainly one with some visual editor, C ++ for example, to be a frontend, would that be possible? How impactful would it be on performance and...
asked by 29.05.2018 / 05:56