python and C++?

Phil Thompson phil at river-bank.demon.co.uk
Mon May 6 05:40:04 EDT 2002


Totte Karlsson wrote:
> 
> Thanks I'll test boost,
> How about SWIG? is boost preferable? any opinions?
> I read that you can't wrap C++ functions which return pointers? sounds like
> a big limitation to me. My classes return pointers all the time.. is there a
> workaround?
> I want to use the simplest and most versatile..

You might also want to look at SIP
(http://www.riverbankcomputing.co.uk/sip/index.php). It is mature and
used to generate bindings for large class libraries.

SIP handles pointers properly and supports the concept of ownership of
the object being pointed to - so that dtors are called once and only
once.

SIP's weakest point is the poor documentation - but there are plenty of
working examples available.

Phil





More information about the Python-list mailing list