diff --git a/pythonstart b/pythonstart index 436f379..b6d8a4f 100644 --- a/pythonstart +++ b/pythonstart @@ -15,10 +15,12 @@ historyPath = os.path.expanduser("~/.pyhistory%s" % ver) # handler for saving history def save_history(historyPath=historyPath): + import readline try: readline.write_history_file(historyPath) except: pass + del readline # read history, if it exists diff --git a/shared-python-startup.changes b/shared-python-startup.changes index 6bf73ff..e73bc7c 100644 --- a/shared-python-startup.changes +++ b/shared-python-startup.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jul 14 11:03:14 UTC 2020 - Antonio Larrosa + +- Import readline in the save_history handler. Otherwise the call + to readline.write_history_file doesn't work (the readline import + at the beginning of the file is already removed) and is silently + ignored by the exception catcher. + ------------------------------------------------------------------- Mon Apr 27 13:18:52 UTC 2020 - Matej Cepl