Fixing Leo and Idle OS shutdown bug?

David LeBlanc whisper at
Fri Aug 9 02:04:30 CEST 2002

I'm having no trouble using the described api to intercept WM_DELETE_WINDOW
events with Leo. I confirmed this by opening a tkMessageBox in the callback
routine. Worked each and every time on a variety of "new" and "open"ed
windows (i.e: file menu invoked windows), as well as the main startup

This is on windows 2000 with python 2.2.1 and leo 3.4 beta 3 (or 4?)

Sometimes the wingnut between the keyboard and the chair gets loose - have
you checked for that? ;-)

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at
> [mailto:python-list-admin at]On Behalf Of Edward K. Ream
> Sent: Wednesday, August 07, 2002 7:31
> To: python-list at
> Subject: Fixing Leo and Idle OS shutdown bug?
> Leo does not prompt the user to save unsaved files when Windows
> 2K or XP is
> shutting down.  Neither does IDLE.
> 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:
> root.bind("<Destroy>", onKillLeoEvent)
> root.protocol("WM_DELETE_WINDOW", onKillLeoEvent)
> root.mainloop()
> Heck, this code doesn't even fire when I close Leo the regular way.
> Does anyone know of a way to get the job done?  Thanks.
> Edward
> --------------------------------------------------------------------
> Edward K. Ream   email:  edream at
> Leo: Literate Editor with Outlines
> Leo:
> --------------------------------------------------------------------
> --

More information about the Python-list mailing list