From 120538295ebbc0b777c0edc07cfc979ccce2dafb 2011-12-06 19:32:05 From: MinRK Date: 2011-12-06 19:32:05 Subject: [PATCH] handle exit in `ipython console` --- diff --git a/IPython/frontend/terminal/console/interactiveshell.py b/IPython/frontend/terminal/console/interactiveshell.py index b2a2d6d..1c9075a 100644 --- a/IPython/frontend/terminal/console/interactiveshell.py +++ b/IPython/frontend/terminal/console/interactiveshell.py @@ -82,6 +82,10 @@ class ZMQTerminalInteractiveShell(TerminalInteractiveShell): if (not cell) or cell.isspace(): return + if cell.strip() == 'exit': + # explicitly handle 'exit' command + return self.ask_exit() + self._executing = True # flush stale replies, which could have been ignored, due to missed heartbeats while self.km.shell_channel.msg_ready():