In diesem Beispiel kann man sehen, dass der benötigte Arbeitsspeicher ständig anwächst.
Die after_idle() Methode sagt mir nichts. Die Widgets muß ich doch zwischen root=tk.TK()
und mainloop() defininieren. Root.update() bringt hier nichts oder wie meintest Du das?
Gruß Robin
Code: Alles auswählen
import Tkinter as tk
import time
import thread
def counter():
i = 1
while 1:
countvar.set(str(i))
i += 1
root.update()
root = tk.Tk()
countvar = tk.StringVar()
label = tk.Label(root, textvariable = countvar, font = ("Comic Sans MS", 20))
label.pack()
thread.start_new_thread(counter, ())
root.mainloop()