You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit db5994b
Browse filesBrowse the repository at this point in the historyBrowse files
feat(playground): engine radio (minipy / real Python), Pyodide warmed on open and cached
An "Engine" radio above the editor swaps between the step-through interpreter
(minipy, default) and real Python (Pyodide in a Web Worker); the choice is
remembered. In real-Python mode edits re-run automatically and the output and
figures take the right column. The runtime starts downloading shortly after a
playground opens; the worker keeps everything fetched from the Pyodide base in
Cache Storage, so later visits start from the cache. Runs are serialized (newest
wins), stopped after 15 s, and the worker restarts from the cache. The service
worker no longer deletes the Pyodide cache. Replaces the separate card.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/locales/en.json
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -3936,21 +3936,30 @@
3936
3936
"prev": "Previous step",
3937
3937
"next": "Next step",
3938
3938
"real": {
3939
-
"title": "Run in real Python",
3940
-
"engine": "Pyodide · CPython running in your browser",
3941
-
"what": "The step-by-step views come from KnowCS's own interpreter. This runs the same code with the real NumPy, pandas and matplotlib (scikit-learn, SciPy and OpenCV work too), so you can check the output.",
3942
3939
"size": "The first run downloads Python and the libraries your code imports: about 7 MB for Python alone, 10 MB with NumPy, 20 MB with pandas and matplotlib, 37 MB with scikit-learn. Your browser keeps them for next time.",
3943
-
"run": "Run in real Python",
3944
-
"rerun": "Run again",
3945
3940
"stop": "Stop",
3946
3941
"phase_runtime": "Downloading Python…",
3947
3942
"phase_packages": "Downloading {{names}}…",
3948
3943
"phase_running": "Running…",
3949
3944
"took": "{{ms}} ms",
3950
-
"stale": "The code has changed since this run.",
3951
3945
"failed": "Couldn't download Python from {{host}}. Check your connection, then try again.",
3952
3946
"stopped": "Stopped.",
3953
-
"figure": "Figure {{n}}, drawn by real matplotlib"
3947
+
"figure": "Figure {{n}}, drawn by real matplotlib",
3948
+
"output": "Output · real Python",
3949
+
"timeout": "Stopped after {{s}} s. Is there an endless loop?",
3950
+
"see_figures": "No printed output; the figures are below."
3951
+
},
3952
+
"engine": {
3953
+
"label": "Engine",
3954
+
"mini": "Step-through",
3955
+
"mini_sub": "minipy · draws every step",
3956
+
"real": "Real Python",
3957
+
"real_cold": "Pyodide · loads when chosen",
3958
+
"real_loading": "Pyodide · loading…",
3959
+
"real_ready": "Pyodide · ready",
3960
+
"real_failed": "Pyodide · couldn't download",
3961
+
"unavailable": "No browser build of {{name}}",
3962
+
"steps_off": "Step-by-step views need the Step-through engine. Real Python runs the code as is and shows its output and figures."
0 commit comments