Arrow Keys in the Interpreter Interface

Quinn Dunkan quinn at lek.ugcs.caltech.edu
Mon Jan 8 14:24:44 EST 2001


On Mon, 08 Jan 2001 16:42:09 GMT, eandroid at my-deja.com <eandroid at my-deja.com>
wrote:
>I use zsh as my shell instead of bash and as a result my arrow keys do
>not properly work in the interpretter, printing ^[[A instead of
>scrolling back though my history. Has anyone seen this? If I change my
>default shell to bash and relogin it starts working. I think that this
>may be related to scripts that the shell runs on login but Python is the
>only program that seems affected.

I run zsh too, but I don't think your problem has anything to do with zsh.  If
the readline is not compiled, then you will get no line editing or history.
If readline is compiled, you will get those things, but you'll have to
configure readline via ~/.inputrc.  Mine has a 'set editing-mode vi' so arrow
keys don't do history (^[k does).  I think readline defaults to emacs mode,
and I think emacs mode uses arrows for history, so if you don't have a
~/.inputrc but do have a readline module, I dunno.



More information about the Python-list mailing list