2012-07-21

GNU readline with System Python (OS X 10.7)

By default system python loads "fake" readline (fake because it actually uses libedit) from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so. Even if you install readline (which goes into /Library/Python/2.7/site-packages), it will still load it, even if you fiddle with sys.path.

The one solution I have found, which I am not terribly proud of, is to rename readline.so to readline.so.bak. This forces the GNU readline installed via pip/easy_install to be loaded.

Now I have nice things in the python interpreter again.

Cheers,
Steve