From bfdb4a108f66530e20725d801e4bfd5b0d55e8c2 2011-12-07 21:47:14 From: Paul Ivanov <pivanov314@gmail.com> Date: 2011-12-07 21:47:14 Subject: [PATCH] fix magics history in two-process ipython console Before this commit: In [1]: %hist get_ipython().magic(u'hist') In [2]: a? Object `a` not found. In [3]: hist get_ipython().magic(u'hist') get_ipython().magic(u'pinfo a') hist After this commit: In [1]: %hist %hist In [2]: a? Object `a` not found. In [3]: hist %hist a? hist closes #1114 --- diff --git a/IPython/frontend/terminal/console/interactiveshell.py b/IPython/frontend/terminal/console/interactiveshell.py index 1c9075a..1291822 100644 --- a/IPython/frontend/terminal/console/interactiveshell.py +++ b/IPython/frontend/terminal/console/interactiveshell.py @@ -333,7 +333,7 @@ class ZMQTerminalInteractiveShell(TerminalInteractiveShell): self.autoedit_syntax): self.edit_syntax_error() if not more: - source_raw = self.input_splitter.source_reset() + source_raw = self.input_splitter.source_raw_reset()[1] hlen_b4_cell = self._replace_rlhist_multiline(source_raw, hlen_b4_cell) self.run_cell(source_raw)