[IPython-dev] Console ipython - multi-line history editing

Ronen Abravanel ronena at gmail.com
Tue Oct 21 11:26:55 EDT 2014


You can type '%edit 1' to edit In [1].
(Or '%edit _2' to edit Out [2])

In QtConsole, the behavior is as you expected.

On Tue, Oct 21, 2014 at 5:43 PM, Paul Moore <p.f.moore at gmail.com> wrote:

> I don't know whether I am imagining this, but I thought that the
> console IPython shell allowed history editing of multi-line
> statements. So, for example, if In[1] is
>
>     for i in range(3):
>         print(i)
>
> I thought I could use up-arrow to recall the whole two-line statement
> and edit it. But when I try this (on Windows, with Python 3.4, IPython
> 2.3.0 and pyreadline 2.0) it seems that up-arrow recalls single lines.
>
> Is there a configuration setting I need to change, or am I imagining
> this and IPython doesn't do that? (I may be confusing the IPython
> shell with PowerShell's PSReadLine, which does). I know I can use the
> notebook for this, but sometimes console IPython is more convenient...
>
> Thanks,
> Paul
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141021/52b04133/attachment.html>


More information about the IPython-dev mailing list