Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Open
Description
Bug report
Bug description:
In my ~/.pystartup I have the following code:
importatexitimportosimportreadlineimportrlcompleterhistoryPath=os.path.expanduser("~/.pyhistory")defsave_history(historyPath=historyPath):importreadlinereadline.write_history_file(historyPath)ifos.path.exists(historyPath):readline.read_history_file(historyPath)atexit.register(save_history)delos,atexit,readline,rlcompleter,save_history,historyPath
This is something I've been using for years. With this startup file, I can enter the REPL and immediately up-arrow to scroll through the commands I used the last time I used the REPL.
With the new REPL there are two related things going wrong:
- my command history is not loaded (when I immediately up-arrow, it does nothing)
- my command history is not saved in my .pyhistory file (the file is touched but not otherwise modified)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux