daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Nov 22nd, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let spawn = require("child_process").spawn;
  2. let childProcess = spawn('python3',["py03.py"]);
  3.  
  4.  
  5. childProcess.stdout.on('data', function (data){
  6.     console.log("Data from python!: "+data.toString('ascii'));
  7. });
  8.  
  9. childProcess.stdin.write("greetings from nodejs!n");
  10.    
  11. import sys
  12. # from testing.py04 import Whatever
  13.  
  14. line =  input()
  15. sys.stdout.write("Python processed: "+line)
  16. sys.stdout.flush()
  17.    
  18. "Data from python!: Python processed: greetings from nodejs!"
RAW Paste Data
Top