diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2020-05-24 13:57:05 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2020-05-24 13:57:05 +0100 |
| commit | 11ec2cb4c4ca290c71517867ad9369562078b094 (patch) | |
| tree | 512e55243348e899a76419fdfaee3e88d774e455 /python | |
| parent | 9121a7ced53b011299d1540a06aa5ce01a3244ce (diff) | |
Add python configuration
Diffstat (limited to 'python')
| -rw-r--r-- | python/rc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/rc b/python/rc new file mode 100644 index 0000000..cb560be --- /dev/null +++ b/python/rc @@ -0,0 +1,12 @@ +# -*- mode: python -*- + +import atexit +import os +import readline + +history_file = os.path.join(os.getenv('XDG_CACHE_HOME'), 'python_history') +if os.path.exists(history_file): + readline.read_history_file(history_file) +readline.set_history_length(1000) +atexit.register(readline.write_history_file, history_file) +del atexit, history_file, os, readline |
