[IPython-dev] IPython on PyPy
Mon Aug 22 15:57:39 CDT 2011
On 22 August 2011 20:15, Thomas Kluyver <firstname.lastname@example.org> wrote:
> On 22 August 2011 20:03, Fernando Perez <email@example.com> wrote:
>> though for me, at least *some* parts of readline do work with 0.10.2.
>> I've tested with pypy1.6 on a 0.10.2 virtualenv, and I get reasonable
>> tab completion and arrows/cursor handling. History reverse search
>> with Ctrl-r also works, though not the more basic up-arrow behavior we
>> also enable.
> OK, that's interesting. My message to pypy-dev bounced (only subscribers
> can post), so I'll have a play around and see if I can work out where the
> difference comes from.
Worked it out, after some confusion. PyPy's readline module works by
replacing the stock raw_input function, but that only happens after we've
saved a reference to the unmodified raw_input, which we do precisely to
defend against things replacing raw_input.
I think the best way to do it is to move our saving of raw_input_original
from import time to the instantiation of InteractiveShell, just after
init_readline is called. I've just pushed a commit doing this to my
pypy-compat branch (PR 722).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev