Exiting Tkinter when using IDLE

Jason Harper JasonHarper at pobox.com
Thu Mar 11 23:15:58 CET 2004


You have two issues here:

1. Don't use the quit method, instead just close your window.  Your QUIT
button could perhaps use:
	command=self.destroy

2. Don't call mainloop() if IDLE already has one running.  Try this:

import sys
if "idlelib" not in sys.modules:
	root.mainloop()

	Jason Harper



More information about the Python-list mailing list