Posts by Edu 371 • 26 points
3 posts
-
1
votes1
answer69
viewsA: Keyboard condition
from pynput import * from pynput.keyboard import Key, Listener def on_release(key): if key == Key.enter: _thread.start_new_thread(iniciar,()) if key == Key.esc: …
-
0
votes1
answer53
viewsA: Set instance attribute automatically from parameters of another instance attribute (same class)
I hope I’ve helped class Lutador(object): # Atributos def __init__(self, pe): self._peso = float(pe) def classificar(self): if self._peso < 52.2: self._categoria = 'invalido' else:…
-
0
votes1
answer683
viewsA: Python script to save notepad text
I didn’t have this error anymore yes: Typeerror: init() Missing 1 required positional argument: 'value' since in the Optionmenu you forgot to set the variable value Optionmenu(window, P2, *op2).…