Sep-17-2020, 10:58 AM
To expand on my previous answer, because there is same issue present here.
when you create infinite loop like the one on lines 15-16 you block the execution of the program further. i.e. you never reach/start tkinter mainloop on line 18
you need to define function and call it periodically using Tk..after() method
https://stackoverflow.com/a/459131/4046632
when you create infinite loop like the one on lines 15-16 you block the execution of the program further. i.e. you never reach/start tkinter mainloop on line 18
you need to define function and call it periodically using Tk..after() method
from tkinter import * import time win = Tk() win.attributes('-fullscreen', True) win.configure(bg='black') T = StringVar() T.set("88:88:88") lab1=Label(win, textvariable=T, font=('DIGITAL DISMAY', 50), fg="blue", bg="black") # lab1.place(x=10,y=10) lab1.pack() def update_clock(): T.set(time.strftime("%H:%M:%S")) win.after(1000, update_clock) update_clock() win.mainloop()no need to say that it will be better if you use class
https://stackoverflow.com/a/459131/4046632
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs