Skip to content

Instantly share code, notes, and snippets.

@jorgeguberte
Created September 23, 2015 21:43
Show Gist options
  • Save jorgeguberte/2ebc6481cc42eef59934 to your computer and use it in GitHub Desktop.
Save jorgeguberte/2ebc6481cc42eef59934 to your computer and use it in GitHub Desktop.
Spawn python process in nodejs
var python = require('child_process').spawn('python', ['file.py'], {stdio:'pipe'});
var output = "";
python.stdout.on('data', function(data){
console.log(String(data))
})
console.log(output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment