Fixing Leo and Idle OS shutdown bug?

Mike Clarkson support at
Sat Aug 10 04:26:17 CEST 2002

On Fri, 09 Aug 2002 13:11:57 GMT, "Edward K. Ream" <edream at>

>Hmm.  There are conflicting reports about what happens when Linux shuts down
>and there are dirty files in Idle.

Idle (and every other Tk or Tkinter program) does not prompt for save
for dirty files on OS shutdown (or even WM shutdown) in Linux (or any
other version of Xwindows).

Unfortunately the situation for Xwindows is even worse than Windows,
in that I don't think the ICCM was really clear on this, so different
window managers tend to implement this protocol differently, or at
least they used to. I think I recall a standardized message from the
Motif window manager.

On the other hand, if you know Tk and Windows or Xwindows intimately,
it shouldn't be hard to add the few lines of code to Tk to make it
catch these events (see the post attached to my previous message),
and a few more lines to make the wm_protocol command do something
useful with the event. I'll file it as an RFE on the Tk sourceforge
bugs list.


More information about the Python-list mailing list