Skip to content

MacOS Python Script Manager

Latest

Choose a tag to compare

@kamv23 kamv23 released this 28 Oct 23:34
· 1 commit to main since this release

Python Launcher (macOS)

Bold, simple, and fast: flip iOS-style toggles to run Python scripts, watch live console output, and install packages with a click. No Java needed when using the DMG.

TL;DR: Drag the app in, choose a base folder, drop in your .py files, flip toggles to run. Optional: download a portable Python and install packages into an isolated python/imports.

✨ Highlights
• Toggle to run — Every script in scripts/ appears with an iOS-style ON/OFF switch (green = running, red = stopped).
• Live, interactive console — Realtime stdout and stderr at the bottom; send input to the active process.
• Graceful start/stop — Proper process-tree termination to avoid orphaned or zombie Python processes.
• External-launch aware — Background ScriptScanner detects scripts started by other scripts and auto-syncs the toggles.
• One-click packages — “Install Packages…” or “Install requirements…” places dependencies into python/imports (kept separate from user site-packages).
• Portable Python (optional) — “Download Python…” pulls a self-contained Python 3 into python/ and sets it as the interpreter.
• Cross-platform JAR (for devs) — Run the JAR anywhere with a compatible Java runtime.

Note: The app sets PYTHONPATH to python/imports and PYTHONNOUSERSITE to 1 so managed packages take precedence over user site-packages.

📁 Folder layout (created on first launch)
• Python-Launcher/
• python/ — optional portable interpreter
• python/imports/ — isolated site-packages for this app
• scripts/ — your .py files (these appear with toggles)

All app state lives inside the chosen base folder (not in ~/Library/Application Support).

🖥️ Requirements
• DMG app: macOS 12+ on Apple Silicon (arm64). No Java required.
This DMG is arm64 only; Intel Macs should use the JAR.
• JAR: Java 25+ (built with OpenJDK 25). For broader compatibility, build from source targeting release 17 and share that JAR.

🚀 Quick start (DMG)
1. Download “Python Launcher-1.0.0.dmg”, open it, and drag “Python Launcher” to Applications.
Unsigned build: first run may require Right-click → Open → Open (Gatekeeper).
2. On first launch, click “Choose Base Folder”. The app creates the folders listed above.
3. Drop your .py files into scripts/ — they appear with toggles.
4. Optionally set “Python…” to your interpreter, or use “Download Python…” for a portable one.
5. Optionally use “Install Packages…” or “Install requirements…” to populate python/imports.
6. Toggle ON to run a script. Use Stop to halt the active process. Watch logs in the console.

⚠️ Known limitations
• The process scanner ignores “python -m …” and “python -c …” (no clear .py path to map).
• The shipped DMG is arm64 only; Intel users should run the JAR with a compatible JRE.
• If a script daemonizes in unusual ways, the scanner may not map it back to a specific .py.

🧩 Troubleshooting
• App won’t open (unsigned): Right-click the app → Open → Open again.
• Script can’t find imports: Packages install into python/imports; the app sets PYTHONPATH and PYTHONNOUSERSITE accordingly.
• High CPU: The app caps common BLAS thread env vars per process to sensible defaults; tune in your script if needed.
• JAR won’t run: Ensure java -version is 25+, or rebuild the JAR targeting 17.

🗒️ Release notes — 1.0.0
• First public release
• New: iOS-style animated toggles
• New: Interactive Python shell inside the managed environment
• New: Isolated package installs to python/imports
• New: ScriptScanner reflects externally-started scripts
• New: DMG packaging with bundled runtime (no Java install needed)