[英]nodejs - python file not exported in production?
Curios regarding production method.关于制作方法的古玩。 My python file successful in root electron under development mode.
我的python文件在开发模式下在root电子中成功。
code to calling the python调用python的代码
const spawn = require('child_process').spawn;
const output = spawn('python', ['test.py']);
ls.stdout.on('data', (data) => {
console.log(output)
});
This one successful, but if i running the application after doing production mode.这个成功了,但是如果我在执行生产模式后运行应用程序。
electron-packager . --overwrite --platform=darwin --arch=x64 --prune=true --out=release-builds
My electron(production) stuck there without give any output.我的电子(生产)卡在那里没有给出任何输出。 In development perfect.
在发展完善。
can get the path via可以通过
const path = require('path');
const appDir = path.dirname(require.main.filename);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.