Some basic questions about Tkinter (probably v easy for experts!)

Fredrik Lundh fredrik at pythonware.com
Thu Feb 8 13:33:03 EST 2001


Martin Quick/Neil Cerutti:
> >OK, I followed that example and it was very helpful - *however*
> >I think I am misunderstanding your final comment here.  When I
> >typed the example into python running in a DOSbox window, the
> >window & button did appear and did do what they were supposed to
> >before I used root.mainloop().  This seems contrary to what
> >you've written above.
>
> I'm confused about this issue too, I guess.

Under some versions/builds/platforms/phases-of-the-moon, Tkinter
uses the PyOS_EventHook mechanism to keep the event loop running
under the interactive prompt.

> >(Perhaps when I run the thing as a script
> >I need the mainloop() but less so when it's done at command
> >prompt??).

Exactly.

Cheers /F





More information about the Python-list mailing list