[IPython-user] pyreadline question
jorgen.stenarson at bostream.nu
Fri Mar 31 09:24:19 CST 2006
thanks for the report on problems with the doc I'll look into it over
the weekend. I have also been thinking that there should be some way of
specifying the location of the config file so I will look into that as
Ville, do you have any ideas on what would be the best way to support
this in IPython?
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
>> 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 :
> if os.path.isfile(inputrcpath):
> except Exception,x:
> import traceback
> 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
> alternative location.
> 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
> IPython-user mailing list
> IPython-user at scipy.net
More information about the IPython-user