|
@@ -152,11 +152,11 @@ PyObject* CCallPython::CallPython(std::string strPyPath, std::string strPyFuncNa
|
|
|
TCHAR szExecuteDir[MAX_PATH] = { 0 };
|
|
|
_stprintf_s(szExecuteDir, _T("sys.path.append('%s')"), szScriptDir);
|
|
|
PyRun_SimpleString("import sys");
|
|
|
- PyRun_SimpleString("sys.path.append('./')");
|
|
|
- PyRun_SimpleString("reload(sys)");
|
|
|
- PyRun_SimpleString(szExecuteDir);
|
|
|
- _stprintf_s(szExecuteDir, _T("reload('%s')"), szScriptDir);
|
|
|
+ //PyRun_SimpleString("sys.path.append('./')"); // 无用,加载不了当前其他Py模块;
|
|
|
+ //PyRun_SimpleString("reload(sys)");
|
|
|
PyRun_SimpleString(szExecuteDir);
|
|
|
+ //_stprintf_s(szExecuteDir, _T("reload('%s')"), szScriptDir);
|
|
|
+ //PyRun_SimpleString(szExecuteDir);
|
|
|
|
|
|
PyObject* args = NULL;
|
|
|
PyObject* pRet = NULL;
|