diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 400152ad754..671229b2b96 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -610,6 +610,9 @@ def prompt_for_code(self): with patch_stdout(raw=True): text = self.pt_app.prompt( default=default, + # Don't set sigint signal handlers. + # See: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1576 + handle_sigint=False, **self._extra_prompt_options()) finally: # Restore the original event loop.