/python-electron

python standalone app with electron

Primary LanguageJavaScript

Python+Electronデスクトップアプリのパッケージング

require

pip install Flask
pip install pyinstaller
npm install electron-prebuilt -g
npm install request-promise -g

packaging

python packaging

pyinstaller hello.py

alter code in main.js for electron app

// develop
var subpy = require('child_process').spawn('python',['./hello.py']);

change to

// pacaking
var subpy = require('child_process').spawn('./dist/hello/hello');

electron packaging

electron-packager . sample --platform=darwin --arch=x64 --version=0.36.1

refer : Electron as GUI of Python Applications