[Tutor] Is there a 'hook' to capture all exits from a python program?

Doug Basberg dbasberg at comcast.net
Wed Mar 18 19:28:49 CET 2015


I do real-time controls programming and I control a relay in a python
program that must be turned off before the program ends.  First, the program
should never exit unless I do it explicitly.  Is there a 'hook' to process
before any exit (even if not expected).  I must turn off that relay or harm
may occur.  Thanks, Doug



More information about the Tutor mailing list