Mercurial > public > dotfiles
annotate python/.pythonstartup @ 25:732ed3539b7a
Workiva Vim updates.
Local settings for Dart and Groovy.
.vimrc tweaks for recent work and plugins.
Moved readme for bundle up a level so we can .hgignore the entire directory.
Update readme for bundle directory for plugins I started using.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 31 Jul 2015 15:39:23 -0500 |
parents | 357906c82c1f |
children |
rev | line source |
---|---|
bgneal@14 | 1 # python startup file |
bgneal@14 | 2 try: |
bgneal@14 | 3 import readline |
bgneal@14 | 4 except ImportError: |
bgneal@14 | 5 pass |
bgneal@14 | 6 else: |
bgneal@14 | 7 import atexit |
bgneal@14 | 8 import os |
bgneal@14 | 9 import rlcompleter |
bgneal@14 | 10 |
bgneal@14 | 11 # tab completion |
bgneal@14 | 12 readline.parse_and_bind('tab: complete') |
bgneal@14 | 13 |
bgneal@14 | 14 # history file |
bgneal@14 | 15 histfile = os.path.join(os.environ['HOME'], '.pythonhistory') |
bgneal@14 | 16 try: |
bgneal@14 | 17 readline.read_history_file(histfile) |
bgneal@14 | 18 except IOError: |
bgneal@14 | 19 pass |
bgneal@14 | 20 readline.set_history_length(1024) |
bgneal@14 | 21 |
bgneal@14 | 22 atexit.register(readline.write_history_file, histfile) |
bgneal@14 | 23 del os, histfile, readline, rlcompleter |