Persistent Python Command-Line History
I'd like to be able to "up-arrow" to commands that I input in a previous Python interpreter. I have found the readline module which offers functions like: read_history_file , write_history_file , and set_startup_hook . I'm not quite savvy enough to put this into practice though, so could someone please help? My thoughts on the solution are: (1) Modify .login PYTHONSTARTUP to run a python script. (2) In that python script file do something like: def command_history_hook(): import readline readline.read_history_file('.python_history') command_history_hook() (3) Whenever the interpreter exits,