I'm launching a python script like this with nodejs :
var cp = require('child_process');
var spw = cp.spawn('python', ['tql.py']),
spw.stdout.on('data', function (data) {
console.log(data);
});
spw.on('close', function (code) {
console.log("Script ended");
});
spw.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
Knowing that this code is inside a javascript file that is included in an html page and there is a progressbar
element inside it, is there a way to update the progressbar
according to the time of execution of the python script ?