Masoud Abasian
Masoud Abasian

Reputation: 10899

How to call C++ functions from Python code in linux?

I want to call functions of a C++ program from Python code.

How can make C++ functions available in a Python program?

Upvotes: 0

Views: 1911

Answers (2)

Hans
Hans

Reputation: 1789

You can find a simple example of Python's native C API (works just as well for C++) here

If you deal with numerical calculations and you use numpy in your python code, you should consider numpy's extensive additions to the C API (manual)

Upvotes: 1

Maciej Ziarko
Maciej Ziarko

Reputation: 12084

http://www.boost.org/doc/libs/1_47_0/libs/python/doc/

Boost.Python, a C++ library which enables seamless interoperability between C++ and the Python programming language.

Upvotes: 4

Related Questions