Tkinter: Why won't it work?

Jeff Shannon jeff at ccvcorp.com
Wed Mar 27 14:54:05 EST 2002


"A.Newby" wrote:

> Hi.
>
> Below is an example exercise from "An Introduction to Tkinter" by Fredrik
> Lundh. It simply creates a box with a quit button in it. Problem is,
> everytime I click Quit, the program freezes.
>
> Is this a rare but well known bug with Tkinter, Python 2.2, or Windows 98?
> Or is more probable that it's cuz my system is screwed?

Are you running the script from within IDLE or PythonWin?  Running a GUI
program from within either of these environments doesn't work well.  (It has
to do with competing message loops within one process -- both run your scripts
in the same process as their internal code.)  The two possible solutions are
to edit in the IDE but run your script from a DOS window (using DOSkey makes
this relatively painless), or to switch to an IDE that runs your code in a
separate process (most/all commercial IDEs do this; also check out IDLE-Fork
on Sourceforge).

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list