Commit 607035e
fix(simulator): show a banner, not a traceback, when the REPL is output-only
PyScript's input() raises on the main thread, so code.interact() dies on its
first prompt and Pyodide's REPL pane filled with a traceback -- the run looked
broken when in fact the install, the demo and the display had all succeeded.
Catch that one failure and print what is actually true: the script finished and
this runtime's REPL is output-only. Any other exception still reports normally
through _report().
Verified under Playwright: the Pyodide pane now ends with the 3.14.2 banner and
the notice, after PSDisplay initialises and the LVGL demo draws.
This is cosmetic only. Making the Pyodide REPL genuinely interactive still needs
one of the two parity options: make psdisplay worker-safe (it stores a Python
object on the canvas element, which cannot cross the worker boundary), or drive
an InteractiveConsole from xterm's onData the way sim.lvgl.io feeds characters
into MicroPython.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 6c21515 commit 607035e
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
286 | 300 | | |
287 | 301 | | |
288 | 302 | | |
| |||
0 commit comments