Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


These days you should really use PyBind11.


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


boost::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/t...

https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/b...


It works with Python 3 just fine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: