Python shell: Arrow keys not working in PuTTY

David Aldrich David.Aldrich at EMEA.NEC.COM
Mon Feb 23 08:44:41 EST 2015


Hi

I want to use the Python 3.4 interpreter interactively, via a PuTTY ssh session.  Python is running on Centos 5.

Currently, the arrow keys do not work:

$ /usr/local/bin/python3.4
Python 3.4.2 (default, Feb 11 2015, 15:06:33)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ^[[A

This stackoverflow thread:

http://stackoverflow.com/questions/893053/python-shell-arrow-keys-do-not-work-on-remote-machine

suggests that the problem can be fixed by installing the readline package:

sudo apt-get install libreadline-dev

followed by a rebuild of Python

or

pip install readline

Please can anyone comment on the easiest way to fix this?  Is a rebuild of Python necessary?

Best regards

David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150223/15d118c8/attachment.html>


More information about the Python-list mailing list