Код: Выделить всё
def foo(bar):
bar()
Код: Выделить всё
void bar() {
}
Код: Выделить всё
PyObject* function = PyObject_GetAttrString(module, "foo");
// how to create PyObject* args?
PyObject* result = PyObject_Call(function, args, NULL);
Подробнее здесь: https://stackoverflow.com/questions/788 ... c-function