[mapserver-users] missing __init__ in python mapscript (fwd)

teb@mallit.fr.umn.edu teb@mallit.fr.umn.edu
Thu, 24 Jan 2002 22:15:59 -0600 (CST)


>From trussell@mtcsc.com  Thu Jan 24 18:48:24 2002
Received: from lists.gis.umn.edu (lists.gis.umn.edu [128.101.73.109])
	by mallit.fr.umn.edu (8.9.3+Sun/8.9.3) with ESMTP id SAA09696
	for <teb@mallit.fr.umn.edu>; Thu, 24 Jan 2002 18:48:24 -0600 (CST)
From: trussell@mtcsc.com
Received: from daphne.sd.saclant.nato.int (cliffie.spawar.navy.mil [128.49.243.38])
	by lists.gis.umn.edu (8.9.3+Sun/8.9.1) with SMTP id SAA09107
	for <mapserver-info@lists.gis.umn.edu>; Thu, 24 Jan 2002 18:52:24 -0600 (CST)
Received: from carla (dhcp-134.sd.saclant.nato.int [10.0.100.134])
	by daphne.sd.saclant.nato.int (8.11.6/linuxconf) with ESMTP id g0P0oeD04607
	for <mapserver-info@lists.gis.umn.edu>; Thu, 24 Jan 2002 16:50:45 -0800
Message-ID: <00c201c1a53a$0d614810$8664000a@sd.saclant.nato.int>
To: <mapserver-info@lists.gis.umn.edu>
Subject: missing __init__ in python mapscript
Date: Thu, 24 Jan 2002 16:48:44 -0800
Organization: MTC Services Corp.
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_00BF_01C1A4F6.FC21ACE0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Content-Length: 3654

This is a multi-part message in MIME format.

------=_NextPart_000_00BF_01C1A4F6.FC21ACE0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

In the book, Python Essential Reference, there's a part at the end of =
the chapter on extending and embedding python where Beazley describes =
the process of compiling extensions. In this, he creates a file, Setup, =
which is used by make in the build process. In adapting this to building =
mapscript, my file looks like the following:

*shared*
mapscript mapscript_wrap.c

I then run the command:
make -f Makefile.pre.in boot

This is a very simple procedure and results in mapscriptcmodule.sl =
(HPUX). Unfortunately, when attempting to import mapscript from the =
python command line, I get the following error:

Python 1.5.2 (#10, Nov  5 2001, 12:00:19) [C] on hp-uxB
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import mapscript
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "mapscript.py", line 2, in ?
    import mapscriptc
ImportError: dynamic module does not define init function =
(initmapscriptc)
>>>=20

It appears that this function actually is defined but is not being found =
for some reason. Has anyone used this method to build python mapscript? =
Must it be done manually instead?

Regards,
Tom Russell

------=_NextPart_000_00BF_01C1A4F6.FC21ACE0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>In the book, Python Essential =
Reference, there's a=20
part at the end of the chapter on extending and embedding python where =
Beazley=20
describes the process of compiling extensions. In this, he creates a =
file,=20
Setup, which is used by make in the build process. In adapting this to =
building=20
mapscript, my file looks like the following:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>*shared*</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>mapscript mapscript_wrap.c</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I then run the command:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>make -f Makefile.pre.in =
boot</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This is a very simple procedure and =
results in=20
mapscriptcmodule.sl (HPUX). Unfortunately, when attempting to import =
mapscript=20
from the python command line, I get the following error:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Python 1.5.2 (#10, Nov&nbsp; 5 2001, =
12:00:19) [C]=20
on hp-uxB<BR>Copyright 1991-1995 Stichting Mathematisch Centrum,=20
Amsterdam<BR>&gt;&gt;&gt; import mapscript<BR>Traceback (innermost=20
last):<BR>&nbsp; File "&lt;stdin&gt;", line 1, in ?<BR>&nbsp; File=20
"mapscript.py", line 2, in ?<BR>&nbsp;&nbsp;&nbsp; import=20
mapscriptc<BR>ImportError: dynamic module does not define init function=20
(initmapscriptc)<BR>&gt;&gt;&gt; </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>It appears that this function actually =
is defined=20
but is not being found for some reason. Has anyone used this method to =
build=20
python mapscript? Must it be done manually instead?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Tom Russell</FONT></DIV></BODY></HTML>

------=_NextPart_000_00BF_01C1A4F6.FC21ACE0--