title: Run a python script with arguments
body: <p>I want to call a Python script from C, passing some arguments that are needed in the script.</p>
  
  <p>The script I want to use is mrsync, or <a href="http://sourceforge.net/projects/mrsync/">multicast remote sync</a>. I got this working from command line, by calling:</p>
  
  <pre><code>python mrsync.py -m /tmp/targets.list -s /tmp/sourcedata -t /tmp/targetdata
  </code></pre>
  
  <blockquote>
    <p>-m is the list containing the target ip-addresses. 
    -s is the directory that contains the files to be synced.
    -t is the directory on the target machines where the files will be put.</p>
  </blockquote>
  
  <p>So far I managed to run a Python script without parameters, by using the following C program:</p>
  
  <pre><code>Py_Initialize();
  FILE* file = fopen("/tmp/myfile.py", "r");
  PyRun_SimpleFile(file, "/tmp/myfile.py");
  Py_Finalize();
  </code></pre>
  
  <p>This works fine. However, I can't find how I can pass these argument to the <code>PyRun_SimpleFile(..)</code> method.</p>