ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-win32
python-win32
[python-win32] Catching Windows Shutdown events.
by Don Bright other posts by this author
Apr 20 2006 8:18AM messages near this date
| [python-win32] ANN: pywinauto 0.3.3 released - bug fixes, added methods, removed deprecated methods
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.

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved