Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Python.h"
- int main(int argc, wchar_t *argv[])
- {
- Py_Initialize();
- PyObject *op = Py_BuildValue("s", "main.py");
- FILE *fp=_Py_fopen(op,"r+");
- if(fp != NULL)
- {
- PyRun_SimpleFile(fp,"main.py");
- }
- //PyRun_SimpleString("import sys\nprint(\"lol\")");
- Py_Finalize();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement