What a n00b!

Enabling Tab Complete for Python Shell on OS X

I have been struggling with an issue for a bit while trying to get tab completion working on the python shell on OS X. I've been working on a Django project and not being able to tab complete has been a bit obnoxious. It took a few sessions of searching around to find out what's going on, so I thought I'd share it in one place. Turns out that the default shell settings are ready to go with tab complete (I spent a lot of time making sure configs were correct), but OS X simply doesn't ship GNU readline. Instead, Apple just symlinked BSD libedit which is problematic because the default python readline module links to GNU readline.

Someone has already created an egg with readline statically linked just for OS X so the fix is super-easy. Just install the standalone readline module with your favorite python installer. I used:

sudo easy_install readline

Comments

Comments powered by Disqus