title: Reading stdout of child process unbuffered
body: <p>I'm trying to read the output of a Python script launched by Node.js as it arrives. However, I only get access to the data once the process has finished.</p>
  
  <pre><code>var proc, args;
  
  args = [
      './bin/build_map.py',
      '--min_lon',
      opts.sw.lng,
      '--max_lon',
      opts.ne.lng,
      '--min_lat',
      opts.sw.lat,
      '--max_lat',
      opts.ne.lat,
      '--city',
      opts.city
  ];
  
  proc = spawn('python', args);
  
  proc.stdout.on('data', function (buf) {
      console.log(buf.toString());
      socket.emit('map-creation-response', buf.toString());
  });
  </code></pre>
  
  <p>If I launch the process with { stdio : 'inherit' } I can see the output as it happens directly in the console. But doing something like process.stdout.on('data', ...) will not work.</p>
  
  <p>How do I make sure I can read the output from the child process as it arrives and direct it somewhere else?</p>