16

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

Ben
  • 300
  • 2
  • 11
Carmellose
  • 4,815
  • 10
  • 38
  • 56

1 Answers1

2

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>).

Games Brainiac
  • 80,178
  • 33
  • 141
  • 199