[IPython-user] pyreadline question

Jörgen Stenarson jorgen.stenarson at bostream.nu
Fri Mar 31 14:30:24 CST 2006

Michael Foord skrev:
> Michael Foord wrote:
>> Hello all,
>> I'm updating Movable Python and am including pyreadline.
>> First of all the instructions on installing from subversion seem to 
>> include an incorrect step.
>>  From http://projects.scipy.org/ipython/ipython/wiki/PyReadline/Intro
>>     "copy pyreadlineconfig.ini from pyreadline-egg/pyreadline/config"
>> After running ``setup.py install`` I have a ``pyreadline/configuration`` 
>> directory which contains the ini file, but no ``pyreadline-egg`` 
>> directory and no ``config`` directory. I assume this is the right file 
>> anyway.
>> The instructions say to copy this file to "your homedir". Movable Python 
>> is intended to be run from a USB stick on arbitrary computers, so I 
>> would like to be able to specify an alternative location for this file. 
>> How do I do this ?
>> I don't mind patching the distribution, but I would prefer a better 
>> solution.

I have attached patches to ipython and pyreadline that should make it 
possible to set your own path to the configfile.

I had to make some backwards incompatible changes to how pyreadline is 
started. Now the recommended way is to "import readline" to initialize 
pyreadline, if you want to set the config_path do:

import pyreadline.rlmain

before "import readline".

Ville will have to decide on how he wants to expose this in ipython. A 
workaround for now is to add those two lines before "import IPython" in 
the ipython.py startup script.

I'll hold off comitting the pyreadline_config patch until I hear from 
Ville. So I can apply the patch to pyreadline after the patch to ipython 
to avoid having a pyreadline that will not work with ipython.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ipython_config.patch
Url: http://projects.scipy.org/pipermail/ipython-user/attachments/20060331/8c5bba1c/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pyreadline_config.patch
Url: http://projects.scipy.org/pipermail/ipython-user/attachments/20060331/8c5bba1c/attachment-0001.pl 

More information about the IPython-user mailing list