title: Call python script using node.js child_process
body: <p>I was trying to call a python code from my node file. </p>
  
  <p>Here is my node.js Code:</p>
  
  <pre><code>var util = require("util");
  
  var spawn = require("child_process").spawn;
  var process = spawn('python',["workpad.py"]);
  
  util.log('readingin')
  
  process.stdout.on('data',function(data){
      util.log(data);
  });
  </code></pre>
  
  <p>and my python part:</p>
  
  <pre><code>import sys
  
  data = "test"
  print(data)
  sys.stdout.flush()
  </code></pre>
  
  <p>In the cmd window, only <code>util.log('readingin')</code> is shown. What's the problem of my code?</p>