There are actually 3 different filenames for the python history history_filename circling around.
In vanilla Python 3.10, without pyreadlineX, the python history is hard-coded to: ~/.python_history. (Unfortunately!)
See PR discussions here and here. (Clearly even the cpython dev's have no idea where this is going!) 🤣
However, here in pyreadlineX, we have 2 different ones.
- In
./lineeditor/history:
class LineHistory(object):
def __init__(self):
self.history = []
self._history_length = 100
self._history_cursor = 0
# Cannot expand unicode strings correctly on python2.4
self.history_filename = os.path.expanduser(ensure_str('~/.history'))
self.lastcommand = None
self.query = ""
self.last_search_for = ""
- In
./configuration/pyreadlineconfig.ini:
history_filename("~/.pythonhistory")
- (and again used in various places in)
./rlmain.py:
def sethistoryfilename(filename):
self.mode._history.history_filename = os.path.expanduser(
ensure_str(filename))
Neither of these should be used, AFAICT, unless the purpose is different from what should be obvious.
The only thing, I would hate, is if that it would overwrite (or interfere with) the already built-in history.
There are actually 3 different filenames for the python history
history_filenamecircling around.In vanilla Python 3.10, without
pyreadlineX, the python history is hard-coded to:~/.python_history. (Unfortunately!)See PR discussions here and here. (Clearly even the
cpythondev's have no idea where this is going!) 🤣However, here in pyreadlineX, we have 2 different ones.
./lineeditor/history:./configuration/pyreadlineconfig.ini:history_filename("~/.pythonhistory")./rlmain.py:Neither of these should be used, AFAICT, unless the purpose is different from what should be obvious.
The only thing, I would hate, is if that it would overwrite (or interfere with) the already built-in history.