title: child_process spawnSync iterate python stdout results using for loop
body: <p>First I will post my code,</p>
  
  <p>I will give an example of what I am facing problem: </p>
  
  <pre><code>        for(var i=0;i&lt;arrayleng.length;i++){
          var oneScript = spawnSync('python',["/home/demo/mypython.py",arrayleng[i].path]);
          //console.log(String(oneScript.stdout));
  
          fs.readFile('/home/demo/' + arrayleng[i].filename + '.json','utf8',function(err,data){
                  if(err){
                      console.log(err);
                  }else{
                      console.log(data);
                  }
              })          
      };
  </code></pre>
  
  <p>I want spawn child to synchronous only because, my python scripts will return some files, it has to read after each time it executes python script. But now it is reading once after it completes execution of python.And printing it on console at once.Instead of printing after each time it executes python script.</p>