As solve this problem? I'm running this code, window is created, but in console appears message on the error. I think problem the fact that is "after" loop not terminate but the window already destroyed.
Code:
import Tkinter as tk
import time
class App():
def __init__(self):
self.root = tk.Tk()
self.label = tk.Label(text="")
self.label.pack()
self.update_clock()
self.root.mainloop()
def update_clock(self):
now = time.strftime("%H:%M:%S")
self.label.configure(text=now)
self.root.after(1000, self.update_clock)
app=App()
A message in console:
invalid command name "66120320callit"
while executing
"66120320callit"
("after" script)
Sorry for my small information in first post. I'm using Spyder IDE, and bugs see in spyder console, wherein run repeatedly my code. A description this bugs I find in the python bug tracker as "wait_variable hangs at exit"
def __init__
) – Petronella