Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include "Python.h"
  2.  
  3. int main(int argc, wchar_t *argv[])
  4. {
  5.     Py_Initialize();
  6.     PyObject *op = Py_BuildValue("s", "main.py");
  7.     FILE *fp=_Py_fopen(op,"r+");
  8.     if(fp != NULL)
  9.     {
  10.         PyRun_SimpleFile(fp,"main.py");
  11.     }
  12.  
  13.     //PyRun_SimpleString("import sys\nprint(\"lol\")");
  14.  
  15.     Py_Finalize();
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement