[IPython-user] pyreadline question
fuzzyman at voidspace.org.uk
Fri Mar 31 04:18:45 CST 2006
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
> 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
I see that this file is used in rlmain.py.
Line 70 in __init__ :
Line 1190 :
Line 1234 in read_inputrc :
print >>sys.stderr, "Error reading .pyinputrc"
print >>sys.stderr, "Line: %s in file %s"%(lineno,filepath)
print >>sys.stderr, x
raise ReadlineError("Error reading .pyinputrc")
The quickest hack is for me to patch this to use an alternative
location. That's dirty though.
When Readline is instantiated there is no way for me to specify an
I don't instantiate Readline directly, because I use it through IPython.
It would be good to be able to programattically tell IPython where to
find this file (I have to calculate the location dynamically, because
the path will be different every time). IPython should then be able to
pass this to Readline.
What do you think ?
> IPython-user mailing list
> IPython-user at scipy.net
More information about the IPython-user