• This repository has been archived on 14/Dec/2020
  • Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

How to Build an Electron GUI for a Python Module

Logo How to Build an Electron GUI for a Python Module

This project demonstrates how to display the output of a Python module in Electron. The demonstration code performs the following features across platforms 1:

  • Detect if Python 3+ is installed
  • Detect if application specific Python module dependencies are installed
  • List installed, top-level, Python modules in an Electron BrowserWindow

September 2020 Update

  • Revised the Python code to version 3.8 best practices.
  • Revised the Electron code to version 10.1
  • Tested the project on Mac OS 10.15, Ubuntu 20.04, and Windows 10.

Quick Code Tour

  • The code entry point is in package.json under the key "main". The value is "main.js"
  • main.js creates a BrowserWindow and loads index.html.
  • index.html displays a button to click to get a list of top-level Python modules and loads renderer.js.
  • renderer.js loads jQuery and provides an event handler for the button. It also checks for Python 3+ and dependencies. On Win32 it also unpacks it's Python modules from the Electron Asar and places them in app.getPath('userData'). See controller.initPythonWin32() for more.

Animated Screenshot

Demo

1 Tested on Mac OS 10.15, Ubuntu 20.04, and Windows 10↩

Project Status

This project has been archived and is no longer being maintained by the author.

More Repositories

1

local-sqlite-example

Demonstrates database-driven Electron using local SQLite with SQL.js.
JavaScript
190
star
2

bootstrap-example

Demonstrates how to use Bootstrap and jQuery with Electron.
HTML
74
star
3

Adafruit-Feather-M0-Motion-Camera

A firmware application written in C++ using Arduino and Adafruit libraries. It sleeps in low power mode until, activated by the PIR motion sensor, it takes a picture. Images are posted to io.adafruit.com using the REST API.
C++
23
star
4

5mp_motion_camera

How to Build a Water-Resistant, Battery-Operated, Low-Power, Motion-Activated, 5 Mega-Pixel WiFi Camera
C++
6
star
5

composed-html-example

How to Compose Modular HTML Assets in an Electron Application Using Cheerio and jQuery
HTML
4
star
6

Local-Solar-Noon

Demonstrates how to calculate Local Solar Noon and the Equation of Time in JavaScript, Python 3, and C++.
C++
4
star
7

ESP8266-Monitor

A C++ firmware application using Arduino and Adafruit libraries. It monitors time, temperature, humidity, battery voltage, and current.
C++
3
star
8

ble_sensor_service

How to Capture Bluetooth Low Energy Broadcasts in a SQLite Database
C++
2
star
9

zephyr_ble_sensor

Bluetooth Low Energy Environmental Sensor for Adafruit nRF52840 Express and Adafruit BME680.
C
2
star
10

jpeg_catcher

How to Build a CGI That Does Image Processing for a 5 Mega-Pixel Motion-Activated WiFi Camera
C++
1
star
11

kinetic-javascript

An animated line inside a resizable box. The movement of the line is beautiful. The interaction between the line and the moving borders of the box is interesting. Visit the website to see it in action.
JavaScript
1
star
12

Atmel-SAMD21-Monitor

A C++ firmware application using Arduino and Adafruit libraries. It monitors time, temperature, humidity, battery voltage, and current.
C
1
star
13

camera_settings

How to Pass a Simple Struct from C++ to JavaScript and Back Again Using Google FlatBuffers
C++
1
star