Mercurial > public > dotfiles
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/.pythonstartup Tue Jun 04 19:24:08 2013 -0500 @@ -0,0 +1,15 @@ +# python startup file +import readline +import rlcompleter +import atexit +import os +# tab completion +readline.parse_and_bind('tab: complete') +# history file +histfile = os.path.join(os.environ['HOME'], '.pythonhistory') +try: + readline.read_history_file(histfile) +except IOError: + pass +atexit.register(readline.write_history_file, histfile) +del os, histfile, readline, rlcompleter