[SciPy-user] FYI: C++ Extensions for Python
david.grant at telus.net
Tue Nov 2 00:14:25 CST 2004
Prabhu Ramachandran wrote:
>>>>>>"DG" == David Grant <david.grant at telus.net> writes:
> DG> weave - was going to write a python routine which had some
> DG> small piece weave code. The weave code would be talking to a
> DG> C++ library or compiled python extension or something. I was
> DG> able to make a C++ library containing all my C++ code but then
> DG> abandoned it after that, to see if there were simpler methods
>This is a common thing you'd need to do with any other approach as
>well since all of them would link to your C++ code. Plus, building a
>library out of .o's is straightforward.
Actually you're probably right. I was trying to do it with full
automake/autoconf/configure support and that was what I was getting
bogged down in. I guess making a library is the same as is done with
swig right? Just call g++ with the -shared argument?
> I also recommend using SCons
>to build your code.
> DG> swig - at first it seemed like a lot of work to copy
>In my experience SWIG "just works" and works fast and well. Oh, BTW,
>if you do have SWIG wrapped code you can weave SWIG wrapped objects
>too! Look at weave/examples/swig2_example.py and read the
I'll check that out!
David J. Grant
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 200 bytes
Desc: not available
Url : http://www.scipy.net/pipermail/scipy-user/attachments/20041101/c7a7ccd1/david.grant-0001.vcf
More information about the SciPy-user