[Tutor] Can I ask if Tkinter.mainloop() is running?

Gregor Lingl glingl@aon.at
Mon, 22 Jul 2002 15:19:07 +0200


Please do not consider this to be a cross posting (sorry Danny),
but I didn't receive an answer from c.l.py.

Wohin soll ich mich wenden?  (Where shall I turn to? (?) )

Hi!

QUESTION 1:
===========

It's possible (and sometimes convenient) to develop
Tkinter-programs interactively with IDLE provided
one doesn't write the mainloop() call into the program
file. Of course one can add this later if one wants
to run the program standalone.

I'd like to know if - and how - it were possible
to use some test if a Tkinter.mainloop (in this case
the one of IDLE) is already running, thus having
a statement similar to

if __name__ == '__main__':
     < stuff>

at the end of the program of the form:

if not <mainloop already active>:
    app.mainloop()

so one could run the program from IDLE as well as
from the commandline.

QUESTION 2:
===========

Is there a special mailing list or something similar
dedicated to Tkinter related stuff?

Thanks in advance
Gregor