title: Run python script from Node.js (child_process) with named arguments
body: <p>I have a python script which can be run with this argument on the command line:</p>
  <pre><code>python2 arg1 --infile abc.csv --encrypt true --keyfile xyz.bin 1234 WOW path
  </code></pre>
  <p>However, if I try to do the same thing from Node.js child process, I get an error:</p>
  <pre><code>const spawn = require(&quot;child_process&quot;).spawn;
  
  const process = spawn(&quot;python2&quot;, [
    path.join(rootDir, &quot;public&quot;, &quot;python&quot;, &quot;script.py&quot;),
    &quot;arg1&quot;,
    &quot;--infile abc.csv&quot;,
    &quot;--encrypt true&quot;,
    &quot;--keyfile xyz.bin&quot;,
    &quot;1234&quot;,
    &quot;WOW&quot;,
    &quot;path&quot;,
  ]);
  </code></pre>
  <p>It is not running and giving an error.
  But, If I run without the NAMED ARGUMENTS (--encrypt true) etc, it runs successfully:</p>
  <pre><code>const process = spawn(&quot;python2&quot;, [
    path.join(rootDir, &quot;public&quot;, &quot;python&quot;, &quot;script.py&quot;),
    &quot;arg1&quot;,
    &quot;1234&quot;,
    &quot;WOW&quot;,
    &quot;path&quot;,
  ]);
  </code></pre>
  <p>I think my way of passing the NAMED args might be incorrect.
  Please help!</p>