More random python observations from a perl programmer

Michael Hudson mwh21 at cam.ac.uk
Thu Aug 19 18:50:44 EDT 1999


Tom Christiansen <tchrist at mox.perl.com> writes:

>      [courtesy cc of this posting mailed to cited author]
> 
> In comp.lang.python, 
>     Michael Hudson <mwh21 at cam.ac.uk> writes:
> :Ah, have you discovered rlcompleter yet? Put this in your ~/.pythonrc:
> :
> :import rlcompleter

Agh! Duh!

Try making that 

import rlcompleter, readline

(sound of forehead being smacked)

> :readline.parse_and_bind('tab: complete')
> :
> :set PYTHONSTARTUP=~/.pythonrc and then in python type:
> :
> :d={}
> :d.
> :
> :and whack tab a couple of times. This should definitely be better
> :advertised; I use it all the time.
> 
> That just triggers:
> 
>     % python
>     Python 1.5.1 (#1, Sep  3 1998, 22:51:17)  [GCC 2.7.2.3] on linux-i386
>     Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>     Traceback (innermost last):
>       File "/home/tchrist/.pythonrc", line 2, in ?
> 	readline.parse_and_bind('tab: complete')
>     NameError: readline
> 
> Time to do a real install.    Hate redHate.

You might need to do that too.

HTH
Michael




More information about the Python-list mailing list