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
- Ask before running a pygame program on Acode's main page, where it can
reach the app (Python there is not isolated like the worker); declining
runs it in the worker without a display, with an option to not ask again
- Do not start a game that was stopped while the SDL runtime or its
packages were still loading, including while sdl.js itself loads
- Detect real await expressions with ast instead of matching the word,
and stop blocking loops that cannot pause (no JSPI) after a few frames
with a clear error instead of freezing Acode
- dispose() on unmount restores window.fetch (or makes the wrapper a
pass-through if another plugin wrapped it since) and removes the iframe
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,7 @@ while running:
72
72
pygame.quit()
73
73
```
74
74
75
+
- The display runs your program on Acode's main page instead of the isolated worker, so it could access the app and its data. The plugin asks before doing this (you can choose not to be asked again); only allow it for code you trust.
75
76
- Blocking loops like this need Android System WebView 137 or newer (JSPI support). On older WebViews, make the loop async with `await asyncio.sleep(0)` each frame.
76
77
- Running again or closing the console stops the game.
77
78
- If SDL cannot start, the program runs without a display and the console explains why.
Copy file name to clipboardExpand all lines: changelog.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
- Packages such as `numpy`, `pandas`, `matplotlib` and `micropip` are downloaded automatically when imported (internet needed on first use)
9
9
- matplotlib plots are shown in the console, on `plt.show()` or automatically when the program ends. Plots are sized to the console and rendered sharp on high-density screens
10
10
- Pillow's `Image.show()` displays images in the console
11
-
- Experimental pygame support: games draw to a canvas in the console, including ordinary blocking game loops on WebViews with JSPI (Android System WebView 137+). If SDL cannot start, the program runs without a display and the reason is shown
11
+
- Experimental pygame support: games draw to a canvas in the console, including ordinary blocking game loops on WebViews with JSPI (Android System WebView 137+). Asks before running on Acode's main page. If SDL cannot start, the program runs without a display and the reason is shown
12
12
- Header button to toggle line wrap in the console (remembered between sessions)
13
13
- Thin progress line under the console header while Python is loading or code is running
"The experimental pygame display runs this program on Acode's main page, where it can access the app and its data. Only continue for code you trust. Cancel runs it without the display.",
0 commit comments