[Pythonmac-SIG] Tkinter and Python 2.0 problem

Russell E Owen owen@astro.washington.edu
Mon, 18 Dec 2000 08:43:36 -0800


>I am trying to write Tkinter code in Python 2.0.  After executing 
>any Tkinter command, the interpreter (or IDE) will not quit normally.
>
>The problem occurs when I press the Quit key.  The Tk window goes 
>away, but I do not get the >>> prompt back in the interpreter...


In MacPython 1.5.2, and likely still in 2.0, this happens if you have 
the startup options set to continue (return to >>> prompt) after the 
script is done. I don't recall the exact name of the setting, but 
it's the first one. Make sure you run with this setting disabled. 
Then the Quit menu item works correctly and you'll no longer have to 
force-exit the interpreter after a Tkinter script.

Fundamentally, MacPython doesn't get along terribly well with 
Tkinter. We're very lucky it works as well as it does.

-- Russell

P.S. Tk file events are broken in MacPython 2.0. If you are using 
those, stick with MacPython 1.5.2 or other platforms.