Any suggestions on how I can have a Python script detect when its operating system is shutting down or a user is logging out? The script in question is a local web server (based on CherryPy). Thank you, Malcolm