0

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

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

Jacob Schoen
  • 13,714
  • 15
  • 80
  • 101
Masoud Abasian
  • 9,989
  • 6
  • 21
  • 22
  • See examples and more discussion here [Calling C/C++ from python?](http://stackoverflow.com/questions/145270/calling-c-c-from-python) – Hackless Apr 28 '16 at 05:07

2 Answers2

4

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.

Maciej Ziarko
  • 10,624
  • 13
  • 47
  • 69
1

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)

Hans
  • 1,683
  • 2
  • 23
  • 38