diff options
author | EuAndreh <eu@euandre.org> | 2022-05-12 12:01:54 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-05-12 12:01:54 -0300 |
commit | 90eaebabcaaea74237f34cf05709625345f276cc (patch) | |
tree | 349e7609d20ecfb6567652a7e28595cec9647eb0 /etc/python | |
parent | .usr/etc/i3/config: WIP setup extra bindings (diff) | |
download | dotfiles-90eaebabcaaea74237f34cf05709625345f276cc.tar.gz dotfiles-90eaebabcaaea74237f34cf05709625345f276cc.tar.xz |
Move Git repository into ~/.usr/.git/
Diffstat (limited to 'etc/python')
-rw-r--r-- | etc/python/pythonrc.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/python/pythonrc.py b/etc/python/pythonrc.py new file mode 100644 index 0000000..1fc3bfe --- /dev/null +++ b/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) |