1. If you are running python that was not compiled with readline (e.g. Mac OS X system Python), you may first have to run the following:
    2. sudo easy_install -f http://ipython.scipy.org/dist/ readline 
    3. Create a file in your home directory named .pythonrc.py
    4. Add the following lines to it:
    5. import readline, rlcompleter
      readline.parse_and_bind('tab: complete')
    6. Set your PYTHONSTARTUP environment variable to point to this file on shell startup, e.g.:
    7. $ echo 'PYTHONSTARTUP="$HOME/.pythonrc.py"' >> .bashrc
      
    8. Prosper.
    Filed April 4th, 2008 under development, Python
    1. if you’re used to hitting tab for indenting in your interactive python, either switch to using a single space, or change complete to some other keybinding, e.g. readline.parse_and_bind(’\C-J: complete’)

      Comment by magicbronson on August 19, 2008 at 3:26 pm

    Leave a comment