[IPython-user] PyReadline problem - affects standard Windows Python

Jörgen Stenarson jorgen.stenarson@bostream...
Thu May 24 12:41:38 CDT 2007


Paul Moore skrev:
> On 24/05/07, Ville M. Vainio <vivainio@gmail.com> wrote:
>> On 5/24/07, Paul Moore <p.f.moore@gmail.com> wrote:
>>
>>> 1. Remove the readline.py wrapper from PyReadline
>>> 2. Make IPython import from pyreadline rather than readline (which
>>> would be a 2-line change, lines 21 and 26 of IPython/rlineimpl.py)
>> Did you check the latest svn? It should work that way already.
> 
> Wow! Fast response!!! :-) (I'd only picked up the released versions).
> 
> The PyReadline package still distributes the readline.py file, though,
> so that either needs to be removed from the distribution, or there's
> still a minor manual fix I need. Having said that, the fact that core
> Python changes behaviour based on the presence of the module is
> arguably bad behaviour - on the other hand, a 3rd party module
> probably shouldn't be installing a core module in the first place.
> 

Unfortunately this is more complicated than it at first seems. In 
versions before python 2.5 the std-lib module rlcompleter imports 
readline.py explicitly, this means we have to provide readline.py
as part of the install if we want to use the stdlib completion. This 
makes me not want to remove it (readline.py).  However if you know
that you don't want pyreadline from the standard console then you could
delete readline.py as a work around.

If someone has a reasonable suggestion on how to workaround the "bug" in 
rlcompleter and delete the readline.py module I'd be happy to consider it.


/Jörgen







More information about the IPython-user mailing list