Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtzilla/618674 to your computer and use it in GitHub Desktop.
Save gtzilla/618674 to your computer and use it in GitHub Desktop.
## http://stackoverflow.com/questions/675370/tab-completion-in-python-interpreter-in-os-x-terminal/987402#987402
import rlcompleter
import readline
readline.parse_and_bind ("bind ^I rl_complete")
#Whereas this one does not:
#import readline, rlcompleter
#readline.parse_and_bind("tab: complete")
#Save it in ~/.pythonrc.py and execute in .bash_profile
#export PYTHONSTARTUP=$HOME/.pythonrc.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment