readline 6 and (i)python

M Trumpis mtrumpis at berkeley.edu
Fri Mar 13 15:29:22 PDT 2009


There's something funny going on with python's readline module when I
upgrade to a new readline 6 (and subsequently rebuild py25-readline).
When I'm using ipython (which takes advantage of tab completion), the
tab completion appends a space character at the end of the completed
string. This shouldn't happen, and in fact should be controlled by the
preprocessor logic here in readline.c:

#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
        rl_completion_append_character ='\0';
#endif

Sure enough if I grep HAVE_RL_COMPLETION_APPEND_CHARACTER
path-to-python-headers/*.h, it shows up as defined in pyconfig.h

So I think this means that the Python system is configured correctly,
and that readline must be misbehaving. When I roll back to readline 5
and rebuild py25-readline against that, everything's cool again.

Here's some more research done previously on a related readline bug.

http://mail.python.org/pipermail/pythonmac-sig/2005-April/013607.html

Mike


More information about the macports-users mailing list