fivecat opened this issue on Sep 27, 2008 ยท 6 posts
adp001 posted Sun, 28 September 2008 at 2:43 PM
If you close your script window, you interrupt Tkinter with whatever it does. But before the window is closed, Tkinter fires an event. Catch this event, call your "clean-up" and you are done:
<pre class="python wide">
root.protocol(<span class="pystring">"WM_DELETE_WINDOW"</span>, myApp.master.destroy)