Continuously run a Python script from Node.js -


i have python code trying link node.js.

what want start python script , have continuously running , able call functions in script node.

i have tried using python-shell module , works great running script haven't figured out how call specific functions python file.

here .js code working with:

var mypythonscriptpath = 'junk.py';  // use python shell var pythonshell = require('python-shell'); var pyshell = new pythonshell(mypythonscriptpath);  pythonshell.run('junk.py', function (err) {     if (err) throw err;     console.log('finished');   });   pyshell.end(function (err) {     if (err){         throw err;     };      console.log('finished'); }); 


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -