dotfiles/dot_config/python/pythonrc

18 lines
323 B
Text
Raw Normal View History

2023-03-29 22:21:02 -04:00
import os
import atexit
import readline
history = os.path.join(os.environ['XDG_STATE_HOME'], 'python_history')
try:
readline.read_history_file(history)
except OSError:
pass
def write_history():
try:
readline.write_history_file(history)
except OSError:
pass
atexit.register(write_history)