From: Ralf Fassel Date: 2003-05-29T00:17:29+09:00 Subject: Re: Tk - Restart after mainloop exits? * "Phlip" | But what's "my_deletion_prevention_routine"? It's just any function you like to get called when the user presses the button which causes the DELETE_WINDOW request (it's the `puts' in your example). Usually it is some cleanup routine (eg, the same as you would have under File->Exit), but it might also be just (again, in Tk notation) wm protocol {.} WM_DELETE_WINDOW { # do nothing } wm protocol {.} WM_DELETE_WINDOW { wm withdraw {.} } In these examples I assume you know what you're doing there, and that your users have some other means of terminating the application ;-) R'