Skip to content

Instantly share code, notes, and snippets.

@17twenty
Created March 13, 2014 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 17twenty/9535538 to your computer and use it in GitHub Desktop.
Save 17twenty/9535538 to your computer and use it in GitHub Desktop.
Python autocomplete
#!/usr/bin/env python
"""
Set the PYTHONSTARTUP environment variable in our .bashrc (or .bash_profile if you're using that). If the PYTHONSTARTUP variable is set to a readable file, then the contents of that file will be run before anything else when the interactive interpreter is run
echo "export PYTHONSTARTUP=~/.pythonrc" >> .bashrc
"""
import rlcompleter, readline
readline.parse_and_bind('tab:complete')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment