app.post('/therun', (req, res)=>{
var pyshell = new PythonShell('hello.py');
var test={};
pyshell.on('message', function (message) {
console.log(message); //value is correct
//res.send(message); //error here
test=message;
});
console.log(test);
res.send(message); //if i use here message undefined
});
你忘了关闭python shell(之后pyshell.on上()):
而不是作为
你能试着用下面给出的状态码发送同样的邮件吗?在
^{pr2}$希望这有帮助!在
你能告诉我你的控制台上对测试值的反应吗?在
相关问题 更多 >
编程相关推荐