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
  • 14,034
  • 15
  • 82
  • 102
Masoud Abasian
  • 10,549
  • 6
  • 23
  • 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
  • 11,494
  • 13
  • 48
  • 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,741
  • 3
  • 25
  • 38