Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.51 KB

File metadata and controls

39 lines (23 loc) · 1.51 KB

Code style: black

Winston Cube Sim - PyScript Version

Check out the DEMO of this app.

This is the PyScript version of Winston Cube Sim, a Python app to simulate a Winston Draft with a preset list of cards like a cube.

Image of the App running in Firefox

Running it

It is a static site, no build step. Serve the directory over HTTP (the PyScript config and Python files are fetched with fetch, so file:// will not work):

python -m http.server 8000

Runtime

Runs on PyScript 2026.7.3 with the MicroPython interpreter. Both are vendored under vendor/, so the app makes no external requests to load — refresh them with python vendor/update.py.

pyscript.toml maps python/cubedata/cubedata.py into the interpreter's filesystem so main.py can import it, and points interpreter at the vendored MicroPython build.

MicroPython has a reduced stdlib, so cubedata.py ships its own CSV parser and Fisher-Yates shuffle instead of using csv and random.sample, and main.py has a small quote_plus instead of urllib.parse.

The previous version of this app used PyScript Alpha on Pyodide and transferred 7.6 MiB to load. The MicroPython version transfers 0.28 MiB, and reaches interactive in ~70 ms instead of ~1.8 s on a warm cache.