TKINTER glitch on 2.2.2

Howard Lightstone howard at eegsoftware.com
Fri Jan 10 01:09:55 EST 2003


edlsoft at mindspring.com (Burt Leavenworth) wrote in
news:3e1e22e0.12108310 at news1.news.adelphia.net:

>>Burt Leavenworth wrote:
>>> I am upgrading from 1.5.2 to 2.2.2 but now my GUI applications which
>>> work on 1.5.2 no longer work properly.
>>> 

> from Tkinter import *
> import sys
> win = Tk()
> button = Button(win, text = 'Goodbye',command = sys.exit)
> button.pack()
> mainloop()
> 

> 
> There must be some dumb omission.
> 
> Burt

The proper way to exit mainloop() cleanly is to call the quit() method.

However, I assume you called this with python.exe. There is a known bug (SF 
#453489 or #216289 ??) with Tk 8.3  and earlier which will cause the task 
to hang forever (you can't kill it since it gets hung in the task 
termination processing).  You can use pythonw.exe and get better results 
there.  





More information about the Python-list mailing list