Exiting Tkinter when using IDLE

Jason Harper JasonHarper at pobox.com
Fri Mar 12 22:25:53 CET 2004

Eugene Van den Bulke  wrote:
> I have a probleme with the "if idlelib" solution ... without the 
> root.mainloop() the window does not appear after I pressed F5 to run the 
> programm. But when I type root.mainloop() in the shell window that opens 
> up, it works.

That sounds like your IDLE is running your program in a subprocess,
which means that it can't share IDLE's mainloop.  See the followup I posted.

In a subprocess, you can just have root.mainloop() at the end of your
program unconditionally, but this prevents any communication back to the
main IDLE process - your program works fine, but you can't inspect it.
	Jason Harper

More information about the Python-list mailing list