Mac OS X ships with libedit instead of libreadline. libedit doesn't work well with Python's readline module. So a user either needs to use homebrew to install GNU readline or they need to use pip to install the gnureadline module which is a version of Python's readline module which is statically linked to the GNU readline library.
So to help with Mac OS X compatibility for users that have gnureadline installed instead of libreadline, it would be good to have an import setup like so:
try:
import gnureadline as readline
except ImportError:
import readline
Mac OS X ships with libedit instead of libreadline. libedit doesn't work well with Python's readline module. So a user either needs to use homebrew to install GNU readline or they need to use pip to install the gnureadline module which is a version of Python's readline module which is statically linked to the GNU readline library.
So to help with Mac OS X compatibility for users that have gnureadline installed instead of libreadline, it would be good to have an import setup like so: