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


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

Re: unable to import rlcompleter readline

Started byTim Golden <mail@timgolden.me.uk>
First post2014-03-19 09:30 +0000
Last post2014-03-19 09:30 +0000
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: unable to import rlcompleter readline Tim Golden <mail@timgolden.me.uk> - 2014-03-19 09:30 +0000

#68542 — Re: unable to import rlcompleter readline

FromTim Golden <mail@timgolden.me.uk>
Date2014-03-19 09:30 +0000
SubjectRe: unable to import rlcompleter readline
Message-ID<mailman.8275.1395221406.18130.python-list@python.org>
On 19/03/2014 08:55, muru kessan wrote:
> hi guys,
> i want the python interactive shell to be auto complete and i found that
> by adding the following lines in PYTHONSTARTUP file it is possible
> 
> import rlcompleter, readline
> readline.parse_and_bind('tab: complete')
> 
> but i get the following error in git bash shell
> Note: i run windows8 as Operating System
> 
> Python 2.7 (r27:82525, Jul  4 2010, 07:43:08) [MSC v.1500 64 bit
> (AMD64)] on win
> 32
> Type "help", "copyright", "credits" or "license" for more information.
> Traceback (most recent call last):
>   File "C:\muru work 05-nov-2013\python\start.py", line 6, in <module>
>     import rlcompleter, readline
> ImportError: No module named readline

readline is commonly provided on *nix systems, but not on Windows. You
can install a plug-compatible version here:

  https://pypi.python.org/pypi/pyreadline/2.0

(ie pip install pyreadline)

or just use IPython which project maintains it:

  http://ipython.org/

NB installing pyreadline will override the way in which Python interacts
with the standard Windows console's up/down/history recall features.
(Assuming it hasn't changed since I last used it a few years ago).

TJG

[toc] | [standalone]


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


csiph-web