NodeJS:指示数据写入已完成(stdin)

时间:2019-04-25 09:50:47

标签: python node.js stdin child-process spawn

我试图表示我已经完成了NodeJS主过程的编写,但无济于事

pythonProcess.stdin.write(base64Image); // What I'm writing
// None of these worked
pythonProcess.stdin.write("\x04");
pythonProcess.stdin.write("\n");
pythonProcess.stdin.write("\r\n");
pythonProcess.stdin.write(os.EOL);

仅发送pythonProcess.stdin.end()可行(也尝试了cork()uncork(),但均不可行)。由于这是一个过程,因此我经常会查询,我希望避免每次都关闭并重新打开该过程。我在做什么错了?

0 个答案:

没有答案