PyImport_ImportModule返回值=null
緣由:app
1. 添加路徑spa
PyRun_SimpleString("import sys");
PyRun_SimpleString("sys.path.append('./')");
class
2.py文件中有語法錯誤import
3.引用別的模塊,也要把別的路徑加進來。語法
緣由:app
1. 添加路徑spa
PyRun_SimpleString("import sys");
PyRun_SimpleString("sys.path.append('./')");
class
2.py文件中有語法錯誤import
3.引用別的模塊,也要把別的路徑加進來。語法