Command line editing in python shell

Jacek Generowicz jmg at ecs.soton.ac.uk
Mon Feb 5 05:50:29 EST 2001


Thomas Wouters <thomas at xs4all.net> writes:

> On Fri, Feb 02, 2001 at 07:38:17PM +0000, Jacek Generowicz wrote:
> > I have compiled python 2.0 on a Mandrake 7.2 installation. Command
> > line editing is impossible: The up-arrow prints ^[[A and so on.
> > 
> > I guess that some libraries are not being found, as I have previously
> > compiled python 2.0 on a RedHat 6.2 installation and everything worked
> > fine.
> > Any ideas how I can fix this one ?
> 
> You have to compile in the 'readline' module. In Python 2.0 that means
> editing 'Modules/Setup' and uncommenting the line that mentions readline.

This solved the problem. (After obtaining and compiling the library)

> If that doesn't work, you might lack the headerfiles for readline, or they
> might be in an odd location. If you don't have them installed, you have to
> find an RPM that provides them (probably readline-devel.<something>.rpm.)

I used readline-4.1-9mdk-src.rpm which I obtained from rpmfind.net. I
applied the makefile patch that comes in the package before compiling.

Thanks,

Jacek



More information about the Python-list mailing list