Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add python interpreter tab completion

  • Loading branch information...
commit 06902ddbc9025a51051013c83a7e9bbb8b5cf351 1 parent 94df808
@cpdean authored
Showing with 11 additions and 0 deletions.
  1. +3 −0  .bashrc
  2. +8 −0 .pythonrc
View
3  .bashrc
@@ -122,6 +122,9 @@ if [ -f ~/.dotfiles/.git-completion.bash ]; then
. ~/.dotfiles/.git-completion.bash
fi
+# tab completion for python, and maybe other stuff
+export PYTHONSTARTUP=~/.pythonrc
+
# virtualenvwrapper stuff
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/dev
View
8 .pythonrc
@@ -0,0 +1,8 @@
+# tab completion
+try:
+ import readline
+except ImportError:
+ print("readline not available. setting tab completion for python not possible")
+else:
+ import rlcompleter
+ readline.parse_and_bind("tab:complete")
Please sign in to comment.
Something went wrong with that request. Please try again.