Readline and Python 2.6.1 on a Mac

James Brady james.colin.brady at
Thu Jan 15 16:11:01 CET 2009

Hi, I just upgraded Python from 2.5.2 up to 2.6.1 on my 10.5 Mac
(installed from the DMG here:,
and I'm having some problems with readline and rl_completer.

I have PYTHONSTARTUP pointing to this file:
#!/usr/bin/env python

    import readline
except ImportError:
    print "Module readline not available."
    import rlcompleter
    readline.parse_and_bind("bind ^I rl_complete")

Which was working fine for tab completion in 2.5. Now, however, I
can't enter 'b' (lower case b) in interactive python shells - no
character appears.

Just b is broken - 'B' is fine, Ctrl-b is fine, Alt-b even prints an
integration symbol, but 'b' - nothing!

Has anyone seen this before?

More information about the Python-list mailing list