[Pythonmac-SIG] SWIG and making extension modules

Rob Managan managan@llnl.gov
Fri, 10 Dec 1999 10:16:49 -0800


>
>This is one of the reasons I've always stayed away from SWIG. SWIG is nice,
>but it has two drawbacks that are (to me, at least) showstoppers:
>- Any arguments other than the standard int/string/float/etc are difficult.
>Bgen has no trouble with this: as long as you can explain it the C code needed
>to wrap/unwrap argument types it'll do it for you.
>- SWIG exports a C-library more-or-less as-is, which means you often have to
>wrap it into an OO module in Python. Again, bgen is superior here: you can
>explain it if the first (or last, or whatever) argument is of type X the C
>function should be exported to Python as a method of the X type.
>
>--

I guess then that I should continue to encourage you to find time to 
put out an example of how to use bgen. The files in the tools folder 
are a little opaque to me. I suppose that the procedure you have used 
on a module already in MacPython would help a lot in this regard.

*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-
Rob Managan       <mailto://managan@llnl.gov>
LLNL                      ph:  925-423-0903
P.O. Box 808, L-095       FAX: 925-422-3389
Livermore, CA  94551-0808