I'm new to node js,
I call my python script from node, and I want to wait until the python script over. what is the simplest way? my code :
PythonShell.run('public/python/dag.py', null, function (err,result) {
if (err) throw err;
console.log(result)
})
console.log("amit")
my output:
"amit"
["hey python"]
expected output:
["hey python"]
"amit"