What is the motive behind developing Python bindings for existing code in other languages? I see many programmers developing Python bindings for their existing C code. Why? How does it help?
Why are Python bindings developed for existing code in other languages such as C?
536 views Asked by N mol At
3
There are 3 answers
0
On
Because there are many very high quality libraries in C with many many years of testing, bugfixing, etc., and it is crazy to try to reimplement everything in Python (e.g., I would never use cryptographic libraries in Python, one should use bindings to well tested and paranoid-developed C libraries like openssl, NSS, or gnutls).
Python has bindings in C, because C is a low-level language that can be very fast and effective, while providing support for a huge amount of hardware and software capabilities. C is very difficult for beginners and inherently lacks object-oriented features, which Python improves upon. C's lack of object-oriented behaviour also contributed to the creation of C++.
Frequently, software projects are bounded by the speed of the developer and not the execution speed of the code, where Python excels over C, in most cases.
Python's strengths over C include:
http://www.python.org/about/