Detect windows shutdown

Austin austin at maxtronic.com.tw
Wed Jun 22 02:57:51 EDT 2005


My program is running on windows and it is wrritten by Python and wxPython,
built by py2exe.

If my program is executed minimized, and the user want to shutdown or
reboot.
Meanwhile, my program is running and it has several threads running, too.
The shutdown or reboot will cause a error of my program.
Is there any way to dectect windows shutdown or reboot?
If I detect the message of shutdown, I could close all threads of my
program.





More information about the Python-list mailing list