There is a classic version of GlowScript in the GlowScript directory. That's basically a Flask application that handles everything. There's a more modernized version of the Flask application and separate runners and separate documentation repositories in the Flask host, the WASM runner, the rapid script runner, and the documentation directories
Classic Glowscript: ./glowscript
Flask Host: ./flaskHost Wasm Runner: ./wmWVPRunner Rapyd Script Runner: ./rsWVPRunner Docs: ./webVPythonDocsHome
The Flask Host and Runners were synced with Classic GlowScript in June 2026. See docs/superpowers/specs/2026-06-05-glowscript-migration-sync-design.md for what was done.
Added June 2026. Both https://flaskdstorehost-dhppn6xgeq-uc.a.run.app and https://beta.webvpython.org are live.
-
Cloud Run domain mapping — add domain to the existing
flaskdstorehostservice:gcloud run domain-mappings create --service flaskdstorehost --domain <new-domain> --region us-central1
Then add the DNS records Cloud Run provides at the domain registrar.
-
Redeploy runners — update
build.envin both rsWVPRunner and wmWVPRunner to add the new domain to the comma-separated list, then rundo_build.shin each. -
Update Cloud Run env var —
PUBLIC_RUNNER_GUEST_URLmust point to the root GCS path:https://storage.googleapis.com/rswvprunner/untrusted/run.html(already correct as of June 2026). -
Google OAuth — add
https://<new-domain>/google/authto the authorized redirect URIs in Google Cloud Console → APIs & Services → Credentials → OAuth client.
cyvector is a Cython-accelerated vector implementation used by wmWVPRunner. It is currently
disabled in wmWVPRunner/vpython/vec_js.py (#from cyvector import *) because the existing
wheel (cyvector-0.1-cp311-cp311-emscripten_3_1_39_wasm32.whl) was built for Python 3.11 /
Emscripten 3.1.39, but Pyodide v0.29.4 requires Python 3.13 / Emscripten 3.1.58.
Steps to re-enable:
-
Update the pyodide fork (
/Users/steve/Development/pyodide,sjsbranch) to a version that targets Python 3.13 / Emscripten 3.1.58 (merge upstream Pyodide changes intosjs). -
Rebuild the wheel — the cyvector package lives at
pyodide/packages/cyvector/cyvector/cyvector.pyx(already has the kwargs fix from June 2026). Build with the updated Pyodide toolchain to produce acp313wheel. -
Deploy the wheel — copy the new
.whltowmWVPRunner/static/and update the filename reference inwmWVPRunner/src/lib/utils/utils.jsline 2. -
Re-enable in vec_js.py — uncomment
from cyvector import *and removefrom .vector import *inwmWVPRunner/vpython/vec_js.py. Thecyvector.vectorclass will replace the pure-Pythonvectorbase class, giving a performance boost for vector-heavy programs. -
Rebuild vpython.zip —
npm run zipin wmWVPRunner, thendo_build.sh.
Working through the open GitHub issues in wmWVPRunner (catalogued in
wmWVPRunner/ISSUES.md), one fix per commit, each verified in the browser
before committing. Local dev servers: Flask :8080 (docker), rs runner :8090,
wasm runner (vite) :5173.
- Edit
wmWVPRunner/vpython/*.py(and/orsrc/routes/+page.svelte). cd wmWVPRunner && npm run zip— rebuildsstatic/vpython.zip(gitignored) so the dev server serves the updated package.- Reload localhost:8080 and run a test program. A
+page.sveltechange needs a full page reload; a package-only change needs just re-running the program. - Commit with
Fixes #Nonce verified in the browser, then push to main.
- #1 rate()/await inside functions — AST transformer
(
vpython/_async_transform.py); preserves line numbers/comments. NOTE: this is the same root cause as #9 and #20 ('await' outside async function) — those two are very likely fixed too but were not individually re-tested; worth confirming with their programs (Bezier #9, WaveEquation #20) and closing. - #8
copy()— top-level wrapper delegating toclone() - #13
Date()— js Date constructor wrapper - #23 MathJax — load MathJax 2.7.0 before glow in
+page.svelte;_mathjax.pyproxy soMathJax.Hub.Queue([...])converts the Python list to a JS array - ghbars (no GH issue) — was wired to gdots factory and never exported; fixed
- #11 scene.delete() / obj.delete() —
glowProxy.delete()callsremove()when present (canvas/graphs/widgets) elsevisible=False+__deleted=True(3-D primitives have no remove()). setattr used to avoid name-mangling. - #19 plot floats —
graphPlotter.plot()to_js()-converts positional list/tuple args (Pyodide doesn't auto-convert lists to JS arrays) - #3
input()— useswindow.prompt()(what GlowScript's winput uses); Python's builtin input() raised OSError under Pyodide - #17 range() float step — WON'T FIX (documented in ISSUES.md): keep range() integer-only (standard Python); recommend numpy.arange. A user-facing compatibility note in webVPythonDocsHome would be good but isn't written yet.
- Removing the COOP/COEP headers (added for the abandoned Option C worker) is what fixed the "iframe refuses to connect" — COEP require-corp made the Flask page cross-origin-isolated, blocking cross-origin runner iframes.
- Pyodide does NOT auto-convert a Python list to a JS array when calling a JS
function — it passes an opaque PyProxy. This bit #19 (plot) and #23 (MathJax
Queue). Use
to_js(). - GlowScript removal mechanisms differ by type: canvas/scene, graphs, and
widgets have
remove(); 3-D primitives usevisible=False+__deleted. - The glow library configures MathJax itself, but only if MathJax is already loaded when glow evaluates — so MathJax must load BEFORE glow.
- #9, #20 — confirm fixed by the AST transformer, then close
- #5 — forward references (bind before def); real-Python limitation → likely document, like #17
- #6 — NameError when clicking a sphere (scene.bind / event-handler path); may share a root cause with #21
- #21 — vector exchange inside a button handler fails
- #12 sound, #16 print font differs, #14/#15 slow startup/exec
- See
wmWVPRunner/ISSUES.mdfor the full catalogue.