Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #86225 > unrolled thread

Re: Python shell: Arrow keys not working in PuTTY

Started byTim Chase <python.list@tim.thechases.com>
First post2015-02-23 08:33 -0600
Last post2015-02-23 08:33 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python shell: Arrow keys not working in PuTTY Tim Chase <python.list@tim.thechases.com> - 2015-02-23 08:33 -0600

#86225 — Re: Python shell: Arrow keys not working in PuTTY

FromTim Chase <python.list@tim.thechases.com>
Date2015-02-23 08:33 -0600
SubjectRe: Python shell: Arrow keys not working in PuTTY
Message-ID<mailman.19073.1424702467.18130.python-list@python.org>
On 2015-02-23 13:44, David Aldrich wrote:
> 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:
[snip]
> 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?

Depends on what you consider "easier".  If you install readline, but
don't want to rebuild Python, you could also try installing the
rlwrap program and then invoking Python with that:

  bash$ rlwrap python

which should intercept the inputs and handle them with some nice
readline capabilities.

Otherwise, just make sure that Python builds with readline support as
you've read elsewhere.

-tkc

PS: and you mention being on CentOS but running apt-get.  I believe
CentOS and other Red-Hat based distros use "yum" instead of "apt-get"



[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web