title: How do you run a python script from a C++ program?
body: <p>I have been able to find  out a few things I know that you need to include Python.h and that you need to have</p>
  
  <pre><code>Py_Initialize();
  //code that runs the python script
  Py_Finalize();
  </code></pre>
  
  <p>to open and close the interpreter, but that middle part has me lost. Most of the information I can find on the subject use the Py_SimpleString() command with some arguments. I have been searching for a while but I can't find any documentation that clearly explains what that command is doing or how exactly to use it. </p>
  
  <p>I don't necessarily need the  python script to directly pass values to the C++ program. It's writing to a text file and the C++ can just parse the text file for the piece it needs. I just need to get the .py file to run and preform its functions.</p>
  
  <p>Any help is appreciated!</p>