title: Unable to use execvp to run a python3 file from a C file? (macOS)
body: <p>In the code below, I'm trying to execute an existing python file (the python file is fine), while passing an argument, using execvp. For some reason I'm unable to. Also worth mentioning that I'm running this on macOSX. </p>
  
  <p>I'm passing the argument from terminal like this:</p>
  
  <pre><code>#./run testArg
  </code></pre>
  
  <p>I've already tried </p>
  
  <pre><code>   execlp("python3", "python3", "./test.py", NULL);
     execlp("python3", "python3", "./test.py", args);
     execlp("python3", "python3", "./test.py", argv);
  </code></pre>
  
  <p><code>s.t args</code> is:
         <code>char** const args[] = {argv}</code>;</p>
  
  <p>The top one works (but obviously no argument), the bottom two don't.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;sys/wait.h&gt;
  #include &lt;sys/types.h&gt;
  #include &lt;Python/Python.h&gt;
  
  int main(int argc, char* argv[])
  {
    char** const args[] = {argv};
    execvp("./test.py", args);
  </code></pre>