Abnormal Interpreter Shutdown

Terry Reedy tjreedy at udel.edu
Tue Oct 21 21:51:28 CEST 2008

k3xji wrote:
> I think what I am looking for is SetConsoleCtrlHandler(..) which
> receives signals for CTRL+C and system shutdown. I don't want to take
> the power outage into account because as far as I can see there is no
> portable/simple/reliable way to accomplish that. So, thanks for the
> tip again.

If your hardware is connected to a UPS (uninterruptable power supply aka 
battery backup) that signals the OS when power has gone and it has 
switched to the battery, you should be able to respond to that also.

More information about the Python-list mailing list