39votes
1answer
1980views
How to handle keyboard interrupts in Python
My script should clean up when user presses Ctrl+C. How do I handle this?