Fixing Leo and Idle OS shutdown bug?
Edward K. Ream
edream at tds.net
Fri Aug 9 09:11:57 EDT 2002
Hmm. There are conflicting reports about what happens when Linux shuts down
and there are dirty files in Idle.
Dmitri I GOULIAEV says:
> Does Idle prompt for save for dirty files on shutdown in Linux? I know for
> sure that it does not on Windows.
Yes, it does (at least, version 0.4) for the windows which are open by
``File->New Window'' or ``File->Open''. When you attempt to close such
window, you are asked for the confirmation.
``Python Shell'' windows can be closed without any confirmation from the
support @ internetdiscovery.com (Mike Clarkson) says:
>Is there any way to interrupt the shutdown process in TK? I have tried
>binding to Destroy or WM_DELETE_WINDOW for the top level window, like this,
>with no effect:
It's WM_DELETE_WINDOW for the normal program exit, but the OS shutting
down message is WM_QUERYENDSESSION and WM_ENDSESSION.
Problem is that wm_protocol doesn't catch either of these messages.
To change this you have to change Tk. Attached is an old posting
requesting this change to Tk, but AFAIK it still hasn't been
implemented (sorry about the line wrapping).
Can anyone suggest a resolution?
More information about the Python-list