[AstroPy] Re: gui/thread issues

Fredrik Lundh fredrik at pythonware.com
Wed May 25 03:13:08 EDT 2005

David King wrote:

> I will continue to study what I have (that forum-thread link was helpful
> too--thanks).  But I can't help feeling other python gui programmers must
> run up against this problem too, and wonder why practically all the standard
> Tkinter doc (including Grayson's book) just says "you gotta call mainloop()
> to make anything actually appear and respond in Tkinter" (manifestly untrue).

no, that's 100% true if you use Tkinter from a running Python program.  that's
how most people use Python, and that's how most Tkinter programs are meant
to be used.

if you type Python commands into an interactive prompt, the exact behaviour
depends on the program that offers the interactive environment.  if that pro-
gram already runs a main loop (or provides some other kind of message pump),
*and* the program runs your commands/snippets *in its own process*, Tkinter
commands *may* work without additional message handling.  Tkinter itself has
no control over that.


More information about the AstroPy mailing list