Question

I know this has been asked a thousand times, however i need to choose a library that can expose C++ functions and methods to python.

Considering my application, which mainly is a scientific (matrix) library, and python generator's matureness, support availability and performance, i have come across two options:

  • Cython
  • Boost.Python

I have eliminated (for good or bad reasons) others options like SWIG, SIP, Pybindgen, ...

Any advice regarding those 2 library ? Any of these which would have a killer feature ?

My project has namespaces, nested classes, callbacks, and the like.

Thanks

Was it helpful?

Solution

Considering my application, which mainly is a scientific

That pretty much means Cython. Cython was made almost specifically for that very purpose. There is a video on getting started with on from Enthought. Enthought is a company that specializes in scientific calculations.

Cython has a very good integration with Python that is unmatched by C++ or C (you would have to use #include <Python.h>).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top