[SciPy-user] FYI: C++ Extensions for Python
David Grant
david.grant at telus.net
Tue Nov 2 01:14:25 EST 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
>docstrings.
>
>
>
I'll check that out!
>cheers,
>prabhu
>
>
>
>
>
--
David J. Grant
http://www.davidgrant.ca:81
-------------- next part --------------
A non-text attachment was scrubbed...
Name: david.grant.vcf
Type: text/x-vcard
Size: 200 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20041101/c7a7ccd1/attachment.vcf>
More information about the SciPy-User
mailing list