title: Capture keyboardinterrupt in Python without try-except
body: <p>Is there some way in Python to capture <code>KeyboardInterrupt</code> event without putting all the code inside a <code>try</code>-<code>except</code> statement?</p>
  
  <p>I want to cleanly exit without trace if user presses <kbd><strong>Ctrl</strong></kbd>+<kbd><strong>C</strong></kbd>.</p>