[IPython-dev] RE: [Fwd: [IPython-user] re: Fwd: readline for Win32]

Drexler Christopher christopher.drexler at siemens.com
Mon May 12 03:28:55 EDT 2003


Dear List,

I'm working with IPython since a few weeks on a win32 system
and as I was missing the readline support I tried to get
a working readline.pyd. Fernando Perez made it already 
available and as I'm now subscribed I can (hopefully) answer
the problemes related to the package. Also I'm going to write
a more detailed README this week. 


> -------- Original Message --------
> Subject: [IPython-user] re: Fwd: readline for Win32
> Date: Wed, 07 May 2003 16:21:49 EDT
> From: Gary Bishop <gb at cs.unc.edu>
> To: ipython-user at scipy.net
>
> I tried first with the native Cygwin stuff I use all the time. Then I
> downloaded MinGW 2.0.0-3 which appears to have the correct compiler as
> listed in the readme for PyReadline*.

I can't say anything about other MingW-versions as I've only tested the
mentioned one. 

> With the MinGW world I get the following output from the second make
> (the first for libreadline.a and libhistory.a goes fine).

At least :-)

> [...]
> readline.o(.text+0x8b):readline.c: undefined reference to
> `_imp___Py_NoneStruct'
> [...]

It seems that gcc can't find the right python lib. I'm using the
ActiveState python distribution (2.2) and you have to link against
the 'libpython22.a' in the 'libs' directory of the installation 
directory.

I installed python in 'c:/Python22'. Therefore the path in the 
'makefile' is set via '-Lc:/Python22/libs'. Having the flag
'-lpython22' then causes the library 'c:/Python22/libs/libpython22.a'
to be linked. I don't know (and don't hope) that this library is special
to the ActiveState distribution of python. 

So the way to go is: find this library and change the 'LIBS' line in the
makefile e.g. to:

  LIBS=c:/Python22/libs/libpython22.a -lreadline

replacing the path with the one to your library.
This should solve the problem.

Best Regards,
Chris

--
Christopher Drexler, Siemens AG MED AX E 1
Siemensstr. 1 D-91301 Forchheim Germany
Phone: +49 9191 18 9776 Fax: +49 9191 18 9723




More information about the IPython-dev mailing list