title: Pass muliple args to a python script spawned from node.js
body: <p>I am trying to "spawn" a python script in Node.JS. The python script accepts multiple file paths as args. This command works:</p>
  
  <pre><code>python3 script.py 'path1' 'path2' 'path3'
  </code></pre>
  
  <p>In node, I am given a var with the paths:</p>
  
  <pre><code>args = ["path1", "path2", "path3"]
  </code></pre>
  
  <p>But when I try to spawn the script:</p>
  
  <pre><code>var spawn = require("child_process").spawn;
  var pyspawn = spawn(
    'python3', [pyscript.py, args]
  );
  </code></pre>
  
  <p>But this appears to issue the command: </p>
  
  <pre><code>python3 script.py [path1,path2,path3]
  </code></pre>
  
  <p>Tinkering with various concat()s, join()s, and toString()s I can get stuff that looks like:</p>
  
  <pre><code>python3 script.py "'path1' 'path2' 'path3'"
  </code></pre>
  
  <p>... but cant for the life of me figure how to do this simply</p>