Enable Tab Completion in Python Shell (OSX)
It is annoying that python shell in osx doesn't have autocomplete enabled by default. I used iPython when I need tab completion before I stumbled into this.
Running the following line should enable tab completion on current shell session (make sure to install readline module first). I would be nice to have it in your .pythonrc file as well.
import readline, rlcompleter; readline.parse_and_bind("tab: complete")
Written by Arif Widi Nugroho
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#