Commits

Steve Losh committed 154eb9c

Handle Ctrl+C cleanly.

Comments (0)

Files changed (1)

 
 
 if __name__ == '__main__':
+    import signal
+    def sigint_handler(signal, frame):
+        sys.stdout.write('\n')
+        sys.exit(130)
+    signal.signal(signal.SIGINT, sigint_handler)
     main()