Mercurial > public > dotfiles
comparison python/.pythonstartup @ 12:71f65ccb96f0
Adding my .hgrc and .pythonstartup files.
Added a .hgignore.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 04 Jun 2013 19:24:08 -0500 |
parents | |
children | 357906c82c1f |
comparison
equal
deleted
inserted
replaced
10:b113527fa5d1 | 12:71f65ccb96f0 |
---|---|
1 # python startup file | |
2 import readline | |
3 import rlcompleter | |
4 import atexit | |
5 import os | |
6 # tab completion | |
7 readline.parse_and_bind('tab: complete') | |
8 # history file | |
9 histfile = os.path.join(os.environ['HOME'], '.pythonhistory') | |
10 try: | |
11 readline.read_history_file(histfile) | |
12 except IOError: | |
13 pass | |
14 atexit.register(readline.write_history_file, histfile) | |
15 del os, histfile, readline, rlcompleter |