curses module

Kenneth Manheimer (klm@NIST.GOV)
Wed, 31 Aug 1994 13:52:04 -0400 (EDT)

Howdy. I resolved a couple of problems that i hit in compiling the
curses module under sunos 4.1.3, and i also have some remaining
problems outstanding. I figured other people might could use the
things i resolved, and perhaps you can shed some light on the
remaining ones...

Accomodations for SunOS 4.1.3, Python 1.0.3

(1) I had to retrieve the latest version of Include/rename1.h from
guido's working set, for definitions of things like PyObject and
PyArg_NoArgs. (I believe that the version i was having problems with
was the one distributed with 1.0.3, which would mean that there is a
new intermediate version that you need to compile the curses module.)

(2) There was a semicolon missing on line 186 -
char *PyCursesVersion = "1.0 first release"

(3) I had to put /usr/5include on the include path for the compile,
and /usr/5lib for the load, in order to get the SysV curses, rather
than the default bsd version. (This gets things like the definition
for SCREEN, as well as numerous constants, used in cursesmodule.)

(The dynamic load compilation was configured by adding the following
two lines to my minimal-intervention makefile:

cursesmoduleCFLAGS= -I/usr/5include
cursesmoduleLDFLAGS= -L/usr/5lib -lcurses -ltermcap

Those are the only additions, besides putting the cursesmodule in the
directory with the makefile, necessary to compile and install the .so.
Is anyone using this "adaptive" makefile that i posted a while back?)

Remaining Problem

So the module now compiles and loads to the dynamic object, but it
does not import successfully. I get the message:

ImportError: dynamic module does not define init function

when i try to import it. It seems like version-mismatch problems
could be the problem here, in which case there wouldn't be much i
alone could do to tackle them.

I'm looking forward to working with the curses module - it looks real
nice!

Ken
ken.manheimer@nist.gov, 301 975-3539