const char * file = "sympy";
const char * function = "lambdify";
Py_Initialize();
PyObject* pModuleString = PyString_FromString(file);
PyObject* pModule = PyImport_Import(pModuleString);
PyObject* pFunction = PyObject_GetAttrString(pModule, function);
PyObject* pargs = PyTuple_Pack(2,PyString_FromString("x,y"), PyString_FromString("x+y"));
PyObject* presult = PyObject_CallObject(pFunction, pargs);
Py_DECREF(pModule);
Py_DECREF(pModuleString);
Py_DECREF(pFunction);
Py_DECREF(pargs);
Py_Finalize();
行PyObject*presult=blah显示以下错误
Exception AttributeError: "'NoneType' object has no attribute 'f_locals'" in <module 'threading' from 'C:\Anaconda2\Lib\threading.pyc'> ignored
请帮帮我!你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐