Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:not': 0.03; 'interpreter': 0.05; 'subject:Python': 0.06; 'session.': 0.07; 'currently,': 0.09; 'subject:keys': 0.09; 'python': 0.11; '-tkc': 0.16; 'elsewhere.': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'inputs': 0.16; 'invoking': 0.16; 'rebuild': 0.16; 'ssh': 0.16; 'sudo': 0.16; 'followed': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'otherwise,': 0.22; 'install': 0.23; 'this?': 0.23; 'mention': 0.26; 'header:In-Reply-To:1': 0.27; 'keys': 0.31; 'work:': 0.31; 'anyone': 0.31; 'running': 0.33; 'comment': 0.34; 'could': 0.34; 'but': 0.35; 'installing': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'received:10': 0.37; 'being': 0.38; 'depends': 0.38; 'easiest': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; "you've": 0.63; 'believe': 0.68; '3.4': 0.84; 'apt-get': 0.84 X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|tim@thechases.com X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1424701934064:3840595078 X-MC-Ingress-Time: 1424701934063 Date: Mon, 23 Feb 2015 08:33:47 -0600 From: Tim Chase To: python-list@python.org Subject: Re: Python shell: Arrow keys not working in PuTTY In-Reply-To: <41302A7145AC054FA7A96CFD03835A0A0B9451B8@EX10MBX02.EU.NEC.COM> References: <41302A7145AC054FA7A96CFD03835A0A0B9451B8@EX10MBX02.EU.NEC.COM> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AuthUser: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424702467 news.xs4all.nl 2857 [2001:888:2000:d::a6]:44654 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86225 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"