[python-win32] Catching Windows Shutdown events.

Don Bright dbri.tcc at gmail.com
Thu Apr 20 17:13:46 CEST 2006


Hello,

I need to do something when windows shuts down, as when someone presses the
power button.

I believe this is a window message, WM_QUERYENDSESSION or WM_ENDSESSION.

I can't find any way to trap this in python.

atexit() does not work.

using the signal module to trap SIGBREAK or SIGTERM does not work either.

Any help? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20060420/9d82aeaa/attachment.html 


More information about the Python-win32 mailing list