control-right next-word in python interpreter and readline on a mac
Posted by ark, ,
It's bothered me for a long time that the python interpreter ignores my .inputrc and prints ;5D;5C when I do control-left and control-right on my mac (both OSX 10.5 Leopard and 10.6 Snow Leopard). It works fine everywhere else and I finally found the simple solution:

sudo easy_install readline

You'll also need the following lines in ~/.inputrc but you likely have those anwyay.

"\e[1;5D": backward-word
"\e[1;5C": forward-word

my .inputrc has a bunch of junk in it that I can't even remember why it was added here are some other gems from it:

set completion-ignore-case on
set bell-style visible
set mark-symlinked-directories on
set bind-tty-special-chars off