Python.hをいじると、次のエラーが発生しました。
AttributeError: 'module' object has no attribute 'argv'
C ++コード:
#include "stdafx.h"
#include "C:/Python27/include/Python.h"
#include <iostream>
using namespace std;
int main()
{
Py_Initialize();
PyRun_SimpleString("import sys\nprint sys.argv[0]");
}
Pythonでは次のとおりです。
import sys
print sys.argv[0]
私は何が欠けていますか?