How to detect windows shutdown

Peter Hansen peter at engcorp.com
Wed Apr 6 10:12:06 EDT 2005


Austin wrote:
> I wrote a program running on windows.
> I put the link of the program in "Start up" folder and let it executed 
> minimized.
> Every time when I open the computer, my program will be running in system 
> tray.
> 
> But if the user would like to shutdown the computer, the OS will show an 
> error about exception.

Important missing information:  is this a GUI program or
a console program, and if it's a GUI program, what framework
did you use to write it (wxPython, PyQt, other...)?  Also,
what is the exception that you got?  (Always report the
specific error: we can't guess what exception you got,
and the answer could well point directly to a cause that
is different than you think it is.)

-Peter



More information about the Python-list mailing list