Quantcast

Accessing module name in .i file (for Python)?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Accessing module name in .i file (for Python)?

Jim Crowell-2

I'm working on Python bindings for a module named PySZG. One of my
co-developers has embedded some Python code, for example:

%pythoncode {
    # __setstate__ recreates an object from its pickled state
    def __setstate__(self,t):
        _swig_setattr(self, arMesh, 'this',
            _PySZG.new_arMesh(t))
        _swig_setattr(self, arMesh, 'thisown', 1)
}

I want to be able to specify an alternate module name on the command
line. Is there a pre-processor variable containing the name of the
module I can substitute for the explicit '_PySZG' here, or is there a
better way to do this?

Thanks,
-Jim C.


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Loading...