Is there way trun python script in sync with node
function() {
let pyshell = new PythonShell('.myscript.py')
let content = ""
pyshell.on('message',function(message){
content = message
})
return content // content needs to be message instead due to async nature it returns empty string
}
Reactions are currently unavailable
Is there way trun python script in sync with node
function() { let pyshell = new PythonShell('.myscript.py') let content = "" pyshell.on('message',function(message){ content = message }) return content // content needs to be message instead due to async nature it returns empty string }