Fixing Leo and Idle OS shutdown bug?

Edward K. Ream edream at
Thu Aug 8 10:54:09 EDT 2002

Thanks very much for this report.  This is essentially the code that does
not work for me on Windows.

Does Idle prompt for save for dirty files on shutdown in Linux? I know for
sure that it does not on Windows.

BTW, on Windows, the root window is visible when the program is invoked from
Idle, but not when invoked from the Windows console window (!)  Moreover,
the value returned from the callback seems to be ignored in all cases.  I
don't know where this is documented, but the callback for WM_DELETE_WINDOW
apparently should return 0 if closing the window is to be vetoed.  In short,
on Windows I can not get this code to work well for the Tk root window even
for normal closes, much less on shutdown.  (Similar callbacks for other
windows work as intended.)

So I'll amend my original question.  Does anyone have an example of code
that handles shutdown properly on a Windows machine?

Edward K. Ream   email:  edream at
Leo: Literate Editor with Outlines

More information about the Python-list mailing list