I'm trying to design a program on tkinter to do a countdown.
I can not understand why I can not get Entry and turn it into an integer. (As this is just a test, I did it using Portuguese myself)
from tkinter import*
root = Tk()
inicio = Entry(root)
#adicionei esta linha abaixo
print(inicio.get())
sec = int(inicio.get())
def tick():
global sec
if sec == 0:
time['text'] = 'TEMPO ESGOTADO'
else:
sec = sec - 1
time['text'] = sec
time.after(1000, tick)
label = Label(root, text="Quanto tempo você tem para realizar suas tarefas?")
label.grid(row=0, column=0)
inicio.grid(row=1, column=0)
time = Label(root, fg='green')
time.grid(row=2, column=0)
Button(root, fg='blue', text='Start', command=tick).grid(row=3, column=0)
root.mainloop()
Only one blank space has been printed, as you can see.