I am writing an application using Tkinter along with threading.
The problem I got is, after closing the main app, some thread is still running, and I need a way to c
If you are using something like this:
import Tkinter
root = Tkinter.Tk()
root.bind('', lambda e: root.quit()) # quitting by pressing spacebar
root.mainloop()
and not: root.destroy()
then the quit method will kill the Tcl interpreter not just breaks out from the mainloop and deletes all widgets. So once you called root.quit()
you can be sure, that your root
is completely dead!
All the other methods you suggested (like: wminfo_exists()
) are only available when at least one valid Tk
exists.
NOTE:
If you are using more than one mainloop, you should use the destroy method to make sure, that your main mainloop won't be killed -- but I don't think this is your case.