#include
#include
using namespace std;
int main(int argc, char* argv[]) {
PyObject *pModule, *pDict, *pFunc;
PyObject *pArgs, *pArg, *pResult;
Py_Initialize();
// ...
PyRun_SimpleString("import sys");
PyRun_SimpleString("sys.path.append("./")");
// ...
pModule = PyImport_ImportModule("callback");
if(pModule != NULL) {
pDict = PyModule_GetDict(pModule);
pFunc = PyDict_GetItemString(pDict, "hello");
if(pFunc && PyCallable_Check(pFunc)) {
pResult = PyObject_CallObject(pFunc, NULL);
if(pResult != NULL) {
cout
using namespace