4 ms·
If you are on c++ there is boost python. It wraps the CPyyhon api in a good way with lots of nice stuff like automatic ref counting, function definitions and da
by Too 6y ago
If you are on c++ there is boost python. It wraps the CPyyhon api in a good way with lots of nice stuff like automatic ref counting, function definitions and data type conversions.
- fnord123 6y agoboost::python targets Python2 only. At least it used to and the docs don't mention anything about fixing this. https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/tutorial/index.html https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/t... https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/building.html https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/b...
- tkuraku 6y agoIt works with Python 3 just fine.
- beojan 6y agoThese days you should really use PyBind11.
- touisteur 6y agoOh it's great of you're binding c++. Template magic, magick-er than boost, didn't think it was possible but it works really nice out of the box. So nice it inspired other libraries in other languages. See Ada-py-bind on github. Still some code to write by hand but the abstraction is quite nice.