Tk windows in w2k IDLE don't close
Matthew Wilson
mwilson at sarcastic-horse.com
Thu Oct 9 15:10:50 EDT 2003
Hi -
I wrote this program:
import Tkinter
root = Tkinter.Tk()
root.title('tkfun is tktastic!')
cc = Tkinter.Canvas(root, width=400, height=400, bg="white")
for x in range(0,400,20):
color = "#%x%x%x" % (x*12,x*12,x*12)
rect = (x,x,x+20,x+20)
cc.create_rectangle(rect, fill=color)
cc.pack()
root.mainloop()
I write all that in an idle window and then hit f5 to run it. The window
pops up ok, but after I close it, I still don't get my python interactive
session back. If I try to close that window, I get a message saying the
program is still running. What am I doing wrong?
Thanks in advance.
More information about the Python-list
mailing list