By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,011 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

linux-python arrow-key problem when in interactive interpreter

P: n/a
I'm running redhat 9 with python 2.3.3 and when I'm in gnome-terminal
and inside the python interpreter I can't use the arrow keys anymore.
They simply show ^[[A, ^[[B, etc.

It doesn't appear to be gnome-terminal's settings as XTerm has the same
problem. If just at the command prompt they work fine, I'm able to hit
up/down/left/right and see previous/next shell commands or move around
to fix typos on the current line... however once I enter the python
interpreter it stops working.

I have found no options in gnome-terminal for switching anything I would
recognize as useful, such as to "VT100" or anything like that. The only
remotely similar setting was a character encoding of UTF-8 (unicode) and
that didn't seem applicable so I left it alone.

Technically this is probably a linux question not a python question but
since it only (to my knowledge) happens in the python interpreter I
thought you guys might know what I've done wrong.

Gabriel.

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Gabriel Cooper wrote:
I'm running redhat 9 with python 2.3.3 and when I'm in gnome-terminal
and inside the python interpreter I can't use the arrow keys anymore.
They simply show ^[[A, ^[[B, etc.


This might indicate that Python was built without readline.
Also see:
http://groups.google.nl/groups?hl=nl...sf%40pobox.com

HTH,

--
Vincent Wehren <vi*****@visualtrans.de>
http://www.visualtrans.de


Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.