[mapserver-users] Building Mapscript/Python

Doyon, Jean-Francois Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Fri Aug 24 19:18:05 EDT 2001


Hey there,

Well I'm progressing somewhat, I think I've managed to get the module built
and installed properly, now I'm trying to write external methods to make use
of it all :)

This is funny, but how do I initialize a mapObj in Python ? There's no "new"
method on any of the objects (classes in this case).  I found the __init__
function, but when I try to call it I get:

TypeError: unbound method __init__() must be called with instance as first
argument

This is with :

 mapObj.__init__("/home/mapdata/legalsurveys/test.map")

I also tried asinging to something with :

mymap =  mapObj.__init__("/home/mapdata/legalsurveys/test.map")

But same error.  I'm not sure what "instance" it wants as an argument. If I
try giving it another argument, I also get an error saying the name isn't
defined ...

I may have to pre-decalre an "empty" object first, but I haven't found out
how to do that yet :)

Seems to me we really should get a Mapscript/Python doc going :P


Jean-François Doyon
Internet Service Development and Systems Support
GeoAccess Division
Canadian Center for Remote Sensing
Natural Resources Canada
http://atlas.gc.ca
Phone: (613) 992-4902
Fax: (613) 947-2410




More information about the mapserver-users mailing list