[IPython-dev] [IPython-user] IPython 0.8.2 and PyReadline 1.5, getting ready for release...

Fernando Perez fperez.net@gmail....
Sun Nov 25 12:07:13 CST 2007


On Nov 25, 2007 5:50 AM, Hans Meine <hans_meine@gmx.net> wrote:
> On Samstag 24 November 2007, Fernando Perez wrote:
> > It seems to me that the multi-line history is getting mangled up in
> > leopard's libedit, which may behave differently than readline in some
> > subtle aspects.  That may be a bug in our part or one in libedit, but
> > even if it's the latter, we might be able to work around it somehow.
>
> Just a reminder that there's another problem which I mentioned in
> the "Preparing for 0.8.2 release" thread in September:
> In autoindent-mode, one cannot paste sth. like the following:
>
> def x():
>         return "Test %d me %d" % (
>                 23, 42)
>
> (The last line will be truncated at the left.)
>
> Playing around with this, I am now able to provide an extra hint: The culprit
> seems to be the "return" - if you replace that with print, it works properly.
> Obviously, the code handles return specially, but mixes up the notions
> of /next input line/ and /next command line/.

Yup, and for now that will be considered a 'limitation' of the
auto-pasting.  The problem is that to recognize something like your
example in auto-pasting mode would require actually parsing the input
to identify incomplete lines, at pasting time.  I don't know how to do
that in a simple and sane way that doesn't complicate the already
horrible auto-pasting logic further.

I'd love it for that logic to be better, but I'm afraid I don't have a
good solution at this point.  Patches welcome, as usual.

Cheers,

f


More information about the IPython-dev mailing list