CXX and Swig, pros and cons
Roger Hansen
rogerha at ifi.uio.no
Wed Jul 19 08:47:23 EDT 2000
* Jérôme Lecomte
>
> I am fairly new to Python and I'd like to interface part of a medium
> size C++ lib (around 70 classes) to Python. I looked on the www and
> I found CXX and Swig. They seem to have fairly different approach of
> the problem. I wonder which suits best C++.
That depends! SWIG is very good with C, but not with advanced C++,
that is templates, STL, etc. So if the library uses simple C++
features, you could use SWIG. The nice thing with SWIG is that it can
be very simple to build a good interface. Read the C++ support chapter
in User's Guide to determine if you can use SWIG.
CXX has as you say a very different approach. I've just looked at it
myself and are struggling a bit. But I do like some of the features,
like the nice connection to STL.
> If I miss any other tool, please let me know.
SILOON which you can find at <URL: http://www.acl.lanl.gov/siloon/ >
looks promising. I haven't tried it yet though.
HTH,
Roger
More information about the Python-list
mailing list