I\'m working on a python script that starts several processes and database connections. Every now and then I want to kill the script with a Ctrl+C sign
Referred main as the main function and exit_gracefully as the CTRL + c handler
main
exit_gracefully
if __name__ == '__main__': try: main() except KeyboardInterrupt: pass finally: exit_gracefully()