[SciPy-user] FYI: C++ Extensions for Python

Stefan Seefeld sseefeld at art.ca
Tue Nov 2 07:40:25 CST 2004


> From: David Grant [mailto:david.grant at telus.net]
> Sent: November 1, 2004 17:51

> boost.python - Horrible documentation and horrible setup.  
> Nothing good 
> to say about this.  I spent more time on this than any other 
> method and 
> made the least progress.

Just to balance this a bit: I must agree that the documentation
is very sparse, but otherwise it's a wonderful tool. It's totally
non-intrusive in that it doesn't require you to design your C++
API for use with python, but instead it lets you express (via
template traits) how objects are created, how memory management
should be done, etc.
It's extremely powerful yet easy to write (as an example: is there
any other binding that lets you define classes in C++ and derive
from them in python ?)

> So far swig is my choice.  Boost.python looked good but I simple 
> couldn't get bjam to work!

I don't use bjam either. Use the boost.python tests to see what
compiler / linker options to use and then use them with your
own build system. That's what I'v been doing with make/scons/MSVC.
Works like a charm.

Regards,
		Stefan



More information about the SciPy-user mailing list