My configuration files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
327 B

import atexit
import os
import readline
histfile = os.path.join(os.getenv(
'XDG_CACHE_HOME', os.path.expanduser('~/.cache')
), '.python_history')
try:
readline.read_history_file(histfile)
readline.set_history_length(1000)
except FileNotFoundError:
pass
atexit.register(readline.write_history_file, histfile)