summaryrefslogtreecommitdiff
path: root/python/rc
blob: cb560be7a54800ab1572602de30cf177d520a064 (plain)
1
2
3
4
5
6
7
8
9
10
11
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