A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
Run a python module from C++
Duane Perry
1
Reputation point
I am trying to run a VS python file from VS C++. The following ... PyObject* pName, * pModule,.... pName = PyUnicode_FromString("<filename>.py"); pModule = PyImport_Import(pName); .... Py_Finalize(); The pModule is always NULL. pName have values. I am using Python 3.7. The Python application runs fine. When I try to call it from the C++ app, I get NULL. Suggestions?
Developer technologies | C++
Developer technologies | C++
Sign in to answer