Detect OS shutdown or user logout across different operating systems

Tim Golden mail at timgolden.me.uk
Tue Apr 27 03:55:49 EDT 2010


On 27/04/2010 03:09, python at bdurham.com wrote:
> Is there a OS portable way to have a Python script detect when
> its operating system is shutting down or a user is logging out?
>
> If not, any Windows specific tips on how to detect these events?
>
> Thank you,
> Malcolm
>
>
Doubt v. much if there's anything x-platform. I recently wrote-up
the work done my Klaas Tjebbes (sp?) which I think will do what
you want:

http://timgolden.me.uk/python/win32_how_do_i/track-session-events.html

TJG





More information about the Python-list mailing list