Tk windows in w2k IDLE don't close
vincent wehren
vincent at visualtrans.de
Fri Oct 10 01:04:32 EDT 2003
"Matthew Wilson" <mwilson at sarcastic-horse.com> schrieb im Newsbeitrag
news:mailman.1065726738.14832.python-list at python.org...
| 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?
Try uncommenting "root.mainloop()" as long as your testing/developing in
IDLE.
HTH
Vincent Wehren
|
| Thanks in advance.
|
More information about the Python-list
mailing list