except KeyboardInterrupt
Since Ctrl-C
causes KeyboardInterrupt
to be raised, just catch it outside the loop and ignore it.
kinkun's blog
except KeyboardInterrupt
Since Ctrl-C
causes KeyboardInterrupt
to be raised, just catch it outside the loop and ignore it.