Calling C/C++ from Python?
c, c++, python
Solution
You should have a look at Boost.Python. Here is the short introduction taken from their website:
The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools -- just your C++ compiler. It is designed to wrap C++ interfaces non-intrusively, so that you should not have to change the C++ code at all in order to wrap it, making Boost.Python ideal for exposing 3rd-party libraries to Python. The library's use of advanced metaprogramming techniques simplifies its syntax for users, so that wrapping code takes on the look of a kind of declarative interface definition language (IDL).
Problem
What would be the quickest way to construct a Python binding to a C or C++ library? (I am using Windows if this matters.)
Related problems
- How do I correctly clean up a Python object?
- How to build a dylib from several .o in Mac OS X using gcc
- What is the effect of extern "C" in C++?
- ctypes - Beginner
- Exposing a C++ class instance to a python embedded interpreter
- Prototyping with Python code before compiling
- Embedding Python in C++ and calling methods from the C++ code with Boost.Python
- Can python-C++ extension get a C++ object and call its member function?