X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=lib%2Fpython%2Finit.py;h=7377a26912ec83ab2d87abc833b36a211460f244;hb=ae5f816b7ca05c64e19430dd58626afd04293d57;hp=359d549e6e2544580e5677efd2640e163da78479;hpb=51f3a416301184f084cdee9d668932716fd66e89;p=dotfiles.git diff --git a/lib/python/init.py b/lib/python/init.py index 359d549..7377a26 100644 --- a/lib/python/init.py +++ b/lib/python/init.py @@ -36,22 +36,21 @@ def init(): or os.path.expanduser('~/.inputrc') readline.read_init_file(initfile) - histfile = os.path.expanduser('~/.python-history') + histfile = os.path.expanduser('~/.python_history') try: readline.read_history_file(histfile) except IOError: pass # No such file def savehist(): - histfilesize = os.environ.get('HISTFILESIZE') \ - or os.environ.get('HISTSIZE') - if histfilesize: + histsize = os.environ.get('HISTSIZE') + if histsize: try: - histfilesize = int(histfilesize) + histsize = int(histsize) except ValueError: pass else: - readline.set_history_length(histfilesize) + readline.set_history_length(histsize) readline.write_history_file(histfile) import atexit