dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #01108
Re: Boost Python
On Tue, 4 Oct 2005, Anders Logg wrote:
You have to pick something.
What would the benefits be with Boost Python?
I'm not familiar with SWIG, so I can't offer a direct comparison.
However, using Boost Python one can do automatic arbitrary user-defined
conversion between Python and C++ types. One has to write to write the
conversion function.
Also, it is possible to mimic C++ class structure, including polymophism
on a fine level using Python, with no limits other than those defined by
Python's limitations, as far as I know.
Also, things like smart pointers are handled automatically, and in other
cases where ownership is not well defined it is possible to define
ownership semantics.
See the Boost Python tutorial at
http://www.boost.org/libs/python/doc/tutorial/doc/html/index.html.
Also, see http://www.boost-consulting.com/writing/bpl.html
The arbitary user-defined conversion stuff is not documented as far as I
know, but is easy to use.
Faheem.
Follow ups
References