Questions tagged as 'python-3.x'

2
answers

double for with python

Expensive, good night. Personal I made the connection to the database and I need to compare two tables tab1 and tab2 so that the external "for" fix the first line of "tab1" in column zero and the "for" internal scrolls all the lines of the co...
asked by 28.04.2018 / 05:13
1
answer

Limit items in a dictionary

I'm trying to do data analysis from a self-authored search, the files are already tabbed in .xlsx format. I use openpyxl. My intention at this point is to get participants' status + their opinion and play in a dictionary. The problem...
asked by 28.04.2018 / 12:23
1
answer

Button rounded tkinter

Is there any way to round the ends of the button? Or even leave it as a circumference? Like this for example:     
asked by 25.04.2018 / 06:23
1
answer

Turning this readable code into Python 3

Hello, I wanted to know how to make this legible code for Python 3 ' import urllib proxy = {'http': 'http://myproxy:port'} print ("Using HTTP proxy %s" % proxy['http']) urllib.urlopen('https://google.com', proxies=proxy).read() f = urllib.urlo...
asked by 29.04.2018 / 01:30
1
answer

How do I move an object on the screen using tkinter?

I have already started my code, I just do not know what is going wrong so that my object does not move #Praticar movimentação de objetos from tkinter import* class Bola(object): def __init__(self): self.janela = Tk() self....
asked by 23.04.2018 / 01:15
0
answers

How to leave the oceans blank in the basemap?

The following code produces a map with a color scheme. I need the colors to be just on the continents, leaving the oceans blank. How do I get this? Excel file: link dados=['meteo_model.xlsx'] #vai buscar os dados ao ficheiro excel sheets=...
asked by 17.04.2018 / 00:30
0
answers

AttributeError: 'NoneType' object has no attribute

Hello, I'm doing some testing with the Kivy framework and this error is being presented to me: AttributeError: 'NoneType' object has no attribute 'text' Well, follow the Python code: class Window(BoxLayout): text = StringProperty...
asked by 16.04.2018 / 21:43
1
answer

Django 2 nonexistent Template

In my project I have a project with 2 apps. The first app is learning_logs that has a template, base.html The second app is users, I'm trying to use the learning_logs template in users as follows: {% extends "learning_logs/base.html" %} It...
asked by 20.04.2018 / 00:47
0
answers

Python - about asyncio

I started testing pynput with asyncio, but there is a problem that I can not solve at all. My code: current = set() def on_press(key): if key == keyboard.Key.up: current.add(key) print('Y') if key == keyboard.Key.down...
asked by 20.04.2018 / 08:18
0
answers

Python iterators, asynchronous context managers

I am studying the asyncio module and there are some implementations of some other services that I understand but I got caught up in some doubts, which would be asynchronous iterators and context managers. I've seen codes like this: async de...
asked by 15.04.2018 / 08:50