Apps :: Readline module for Python



I just realised that I need the python readline module for certain hp-* functions to work in hplip (eg hp-setup).

I've tried for ages to compile python-2.3.6 with the readline module without success. The readline module is not compiled by default (it has to be manually enabled after ./configure). I've compiled a full version of gnu readline in order to ensure the proper libraries/headers are available to python but this doesn't seem to help.

During the compile, readline.o is created from readline.c but the python module (readline.py/pyc/pyo I suppose) does not get created - unfortunately there are no error messages that I can see and google does not have much to say on the subject.

Did anyone manage to compile the python readline module for use with python/dsl?

I've still had no luck with compiling the readline extention but readline.so from the python2.3 deb seems to work fine - should've thought of this earlier I guess...

I'll test things for a while and resubmit the python-2.3.uci extension with readline if everything looks OK.

I know you have already found a solution, but in case you want to pursue it... from http://svn.python.org/projects/python/branches/release23-maint/README
Quote
This option is no longer supported.  GNU
readline is automatically enabled by setup.py when present.

Interesting - From the readme in the source tarball, it says that readline is no longer enabled automatically and that the --enable-readline option is no longer active. As far as I can tell, you have to uncomment the readline line in ../Modules/Setup to get readline.

If I do this, readline is partially compiled but readline.so is not built.


original here.