Hacker News new | ask | show | jobs
by wirthjason 1060 days ago
Curious of the different reasons reasons people are creating Python bindings. Was it because the project started in Python, then when performance became an issue the slow parts were rewritten in C++. Or it started in C++ and Python bindings were added later.
4 comments

We did python bindings to be able to call proprietary libs in test environments.
Often also "started in python", then "some 3rd party library needed to add a feature is only available as C/C++".
i have several compiler projects that are 99% C++ (fully functioning APIs etc) but also have python bindings. why? python bindings are by far the best APIs to expose to whatever C/C++ code you have that you want "casual" devs to use. who are casual devs? either people that write code non-professionally or professional devs that pick up your project outside of their day-to-day. there is nothing that beats the ease of use and (today) familiarity that people have with python.
So far, I have done this mostly to integrate with existing C++ libraries that aren't available in python. For eg. to be able to use some Qt library...