C++之python函数调用
代码如下,分别演示直接执行python语句、无返回无参数函数调用、返回单参数函数调用。返回多参数函数调用: #include <Python.h> #include <iostream> using namespace std; //执行python命令 void ExecPythonCommand() { //直接执行 PyRun_SimpleString("from time import time,ctime
...