A very simple Python module to suppress KeyboardInterrupt traceback spam when pressing ^C.
By default, Python screams at you when you press ^C to interrupt a script. (Proper languages like Perl don't do this.)
This module catches KeyboardInterrupt signals and handles them gracefully.
pip install dontpanic
import dontpanic
print('Press control-C to interrupt this program')
while True:
pass # Press ^C to interrupt... or with a custom message:
import dontpanic
dontpanic.set_message("Exiting...")
print('Press control-C to interrupt this program')
while True:
pass # Press ^C to interrupt