diff options
Diffstat (limited to 'python/rc')
| -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 |
