Answer the question
In order to leave comments, you need to log in
How to make a window with refreshable text in Tkintere Python?
I want to create a timer, it works in cmd, I want the value of the variable to change in the window every second, but I don’t know how to do it.
An example of a simple program:
import time
x=0
for i in range(100):
x+=1
time.sleep(1)
print(x)
Answer the question
In order to leave comments, you need to log in
It would be nice to learn a simple GUI, maybe Tkinter
from tkinter import Tk, Label
from time import sleep
root = Tk()
label = Label(text='something')
label.pack()
for x in range(100):
sleep(1)
label.config(text=str(x))
root.update()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question