From ac86f15ca8ff0c15f4bb7df0a46cabdd166a6e59 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 12 May 2022 10:36:37 -0300 Subject: git mv .config .usr/etc --- .usr/etc/python/pythonrc.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .usr/etc/python/pythonrc.py (limited to '.usr/etc/python') diff --git a/.usr/etc/python/pythonrc.py b/.usr/etc/python/pythonrc.py new file mode 100644 index 00000000..1fc3bfe5 --- /dev/null +++ b/.usr/etc/python/pythonrc.py @@ -0,0 +1,15 @@ +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(): + readline.write_history_file(history) + +atexit.register(write_history) -- cgit v1.3