Mercurial > public > dotfiles
annotate 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 |
rev | line source |
---|---|
bgneal@12 | 1 # python startup file |
bgneal@12 | 2 import readline |
bgneal@12 | 3 import rlcompleter |
bgneal@12 | 4 import atexit |
bgneal@12 | 5 import os |
bgneal@12 | 6 # tab completion |
bgneal@12 | 7 readline.parse_and_bind('tab: complete') |
bgneal@12 | 8 # history file |
bgneal@12 | 9 histfile = os.path.join(os.environ['HOME'], '.pythonhistory') |
bgneal@12 | 10 try: |
bgneal@12 | 11 readline.read_history_file(histfile) |
bgneal@12 | 12 except IOError: |
bgneal@12 | 13 pass |
bgneal@12 | 14 atexit.register(readline.write_history_file, histfile) |
bgneal@12 | 15 del os, histfile, readline, rlcompleter |