tkinter question

linuxnooby at yahoo.com.au linuxnooby at yahoo.com.au
Mon Mar 27 18:15:05 EST 2006


Hi

I have a tkinter question. In the following script the window will not
display until the script has finished executing. It appears at the same
time as the output "script finished". How can I make it appear
immediately,  with the output "script finished" appearing 5 seconds
later.

cheers Dave

from Tkinter import *
import time

print "script started"

top = Tk()
F = Frame(top)
F.pack()
Hello = Label(F, text="hello world")
Hello.pack()
           
time.sleep(5)
print "script finished"
       
mainloop()




More information about the Python-list mailing list