diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index df20420..7b99c73 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -429,6 +429,7 @@ class TerminalInteractiveShell(InteractiveShell): break except KeyboardInterrupt as e: print("\n%s escaped interact()\n" % type(e).__name__) + finally: # An interrupt during the eventloop will mess up the # internal state of the prompt_toolkit library. # Stopping the eventloop fixes this, see