-1

Curios regarding production method. My python file successful in root electron under development mode.

code to calling the 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.

aa6my
  • 1
  • 6

1 Answers1

0

can get the path via

const path = require('path');
const appDir = path.dirname(require.main.filename);
aa6my
  • 1
  • 6