Tkinter hangs on mainloop

Fredrik Lundh fredrik at pythonware.com
Tue Apr 20 05:34:24 EDT 1999


<mrfusion at bigfoot.com> wrote:
> I've done a complete install of python ver 1.5.2 on my
> windows98 system and I've run into a problem with Tkinter (no big
> surprise!)  I can import it with the line :  from Tkinter import *

I assume you're running this from the command
line, right?

> widget.mainloop()
> 
> It hangs.

not really.  it doesn't hang, it just doesn't return
immediately.  in fact, it won't return until you've
closed the root window.

> If I wait for a while and then hit Ctr-C I get the
> following error:
> 
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> File "k:\python\lib\lib-tk\Tkinter.py", line 492, in mainloop
>   self.tk.mainloop(n)
> KeyboardInterrupt

before you to this, look in the task bar.  click on
the Tk icon, and the (quite small) window will pop
up.

http://www.pythonware.com/library/tkinter/introduction/intro01.htm
has some more information on the mainloop function.

</F>





More information about the Python-list mailing list