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

Thomas Kluyver takowl at gmail.com
Wed Oct 22 15:39:22 EDT 2014

On 22 October 2014 12:14, Paul Moore <p.f.moore at gmail.com> wrote:

> Actually, it looks like it's deliberate in IPython. See
> https://github.com/ipython/ipython/commit/1bcb58e939edac7812d0ad70d5072e27540b4f32
> (back in 2011).
> I'm not entirely sure how I change that config directly, so I hacked
> the source. With TerminalInteractiveShell.multiline_history=True,
> multi-line history works, but the display is corrupted. So it looks
> like there is a pyreadline display issue at the root of this (i.e.,
> it'd need multi-line display in pyreadline to work before it made
> sense to default this to True).

That's probably why it was disabled on Windows in the first place. If you
haven't already, try with the pyreadline-ais fork - the things it says it
has implemented may be relevant here.

> PS How would I set TerminalInteractiveShell.multiline_history on the
> IPython command line? I'd like to at least report this as a pyreadline
> bug, and being able to describe how to reproduce it *without* saying
> "hack IPython" would be nice :-)

It should be as simple as adding
--TerminalInteractiveShell.multiline_history=True at the command line.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141022/de7a00b7/attachment.html>

More information about the IPython-dev mailing list