How to catch windows shutdown/reboot message

rechardchen rechardchen at gmail.com
Sun Aug 1 21:17:14 EDT 2010


I'm writing a python script which runs as a windowsxp service.
The problem is how to catch the windows shutdown/reboot message and do
some cleaning job when system is going down?

The atexit module and signal module on windows dont seems to work. I
guess the python win32api may be of help, but I am not familiar with it...
Thank you



More information about the Python-list mailing list