Is it possible to use readline instead of libedit in Python's raw_input under OS X?

From the readline module documentation, it mentions:

On MacOS X the readline module can be implemented using the libedit library instead of GNU readline. The configuration file for libedit is different from that of GNU readline.

Is it possible to use the readline library in /usr/lib/libreadline.dylib for example, or even compiled with MacPorts or Homebrew?


$ sudo easy_install readline

It is possible to use GNU readline from MacPorts or elsewhere when building Python by specifying the additional library and include files when invoking the configure script. See the python installer build script in the Python source tree (Mac/BuildScript/ for an example. It builds a local copy of GNU readline when building for targets of 10.4 or earlier.

Keep in mind that on current OS X releases, /usr/lib/libreadline.dylib is merely a symlink to libedit; AFAIK, Apple does not ship GNU readline as a library in OS X:

$ ls -l /usr/lib/libreadline.dylib 
lrwxr-xr-x  1 root  wheel  15 Sep  5  2009 /usr/lib/libreadline.dylib@ -> libedit.2.dylib

Need Your Help

Open Itunes app link in uiwebView

xcode uiwebview itunes

I want to simply open some apps pages from itunes web site, but when tested in the simulator it shows me ann error that the url is invalid, despite it opens correctly from the mac browser.

Implementing accent insensitive search on django using sqlite

python django sqlite python-2.7

This question is related to my earlier question Accent insensitive search django sqlite