Questions tagged as 'python-3.x'

1
answer

Multiprocessing or Multithreading

Good people, recommend what to optimize the code? multiprocessing or multithreading? the script is running in series, but has several for series. Full Code: link     
asked by 04.07.2017 / 18:43
0
answers

How to enter Weather Underground forecast icons

Good afternoon I'm trying to insert the Weather Underground icons but the icons do not appear in Python 3. Below I leave a part of the code. url = "http://api.wunderground.com/api/api_Key/forecast/lang:PT/q/PT/Lisbon.json" temp = urllib.re...
asked by 20.05.2017 / 18:10
1
answer

Dictionary key error

I am trying to store dictionaries in a list and then print according to the position in the list, however this is giving a key error ... Code below: nome = "nomedahora" cpf = "1421241" departamento = "bsi" dicProfessor = {nome: {"nome":nome, "...
asked by 08.06.2017 / 14:37
1
answer

Read csv file using delimiter as the character "|" - Python

I tried to create a DataFrame with the lib pandas from a file that is sent to me in the following format: -------------------------------- |Indice|Preço|Quantidade|Cidade| -------------------------------- |1|1000|2|São Paulo| . . . I used t...
asked by 08.05.2017 / 00:38
1
answer

SQLite inoperable in Python program executable created by cx_Freeze

I made a simple application in Python 3.6 and SQLite3. When I generate the main program executable by cx_Freeze and install it on the machine I developed the application (where Python and SQLite are installed), the application works fine, inc...
asked by 28.04.2017 / 01:55
2
answers

how to make time appear in the window (label)?

I have the following code for a "timer", but it does not appear in the window, just in the Python 3.6 console. How do I get it printed in the window? (note: the window only opens when the preset time ends) from tkinter import* from datetime im...
asked by 07.05.2017 / 01:39
0
answers

byte indices must be integers or slices, not str

itens = [] lugares = [] lugar = None from pickle import dumps # Definição das funções: def adlugar(nome, lookmsg, passagens, objs = None): global lugares global dic dic = dumps(nome) dic = {"nome": nome, "look": lookmsg, "pass...
asked by 19.04.2017 / 21:49
1
answer

Error whenever I use max python 3.6.1

I am starting in python and in this code I send below whenever the execution of the syntax error invalidates. Can you give me some help? lst=[6,10, 2, 1, 9, 35] lstord= sorted(lst) lstord.reverse() print max (lstord) Thank you     
asked by 10.04.2017 / 11:36
1
answer

List getting empty after loop in python

Hello, I have the following code that does this: It will traverse a vector that has a certain sets of elements (remainder) with the same ID ([1] [1] [1] [2] [2] by example) and then store all elements of the same ID in separate vectors and then...
asked by 07.04.2017 / 06:26
1
answer

How to insert accented characters in Text Inputs in PyQt5?

My text entries in PyQt5 (QLineEdit, QPlainTextEdit, Dialogs, ...) do not accept accented characters typed on the keyboard. I can only insert them if I type them in another editor and call Crtl + C, Crtl + V, or by commands in the source code. T...
asked by 29.03.2017 / 19:37