[IPython-user] history files for Python/IPython
Fernando.Perez at colorado.edu
Mon May 17 11:49:35 CDT 2004
Thorsten Kampe wrote:
> What's the deal with the history files?
> My Python shell uses ~/python/.python_history, IPython uses
> ~/.ipython/history and both seem to use a new file ~/.pythonhist that
> comes without ever being defined by me.
> Is it possible to use one and only one common history file with
> IPython and vanilla Python shell?
>  histfile = os.path.expandvars("$HOME/python/.python_history")
If you can specify which one Python uses, then point it to be
~/.ipython/history. Currently in ipython, this filename is hardcoded to be
$IPYTHONDIR/history. Another solution is to symlink one to the other.
I try to keep all of ipython's information in $IPYTHONDIR, to avoid having too
many configuration options (it already has way too many, I just don't want
As for the .pythonhist file, I have NO IDEA who is making it. It's certainly
not ipython explicitly, so perhaps it's something done by readline silently.
I honestly don't know, sorry.
More information about the IPython-user