An early-stage idea, just wondering if anyone else has thought about this:
The web platform is a great place to run code: images, video, speech recognition, peer-to-peer communication, and many more things are built-in features. Beyond that, there are lots of great libraries (tensorflow.js, Observable Plot, ). And with some infrastructure, the results can be shared with friends who don't need to install anything.
In the past, coding for the web has required coding in JavaScript or related languages, but Pyodide runs the real CPython interpreter. Even things like scikit-learn work.
If there were a way to run Pyodide as a Thonny backend, that could provide a way for students to develop code that runs in-browser. (Sharing that code so it runs on anything but your own computer could be a nice-to-have; local-only would already be a big win.)
One way of doing this would be to have Thonny spin up a tiny webserver to host the code and set up a bidirectional channel (Websockets or similar) to a web page that imports Pyodide and runs code on demand. Ability to interrupt code and debug would probably require using a WebWorker and some extra machinery;
https://github.com/pyodide/pyodide/issues/550 has some directions to explore, and
https://futurecoder.io/ could be considered a proof of concept.
Another way of doing this would be to implement enough of Tkinter on top of the DOM so that Thonny itself could run in-browser. (possibly relying on an existing code editor widget like CodeMirror, and maybe some other variations where mimicking Tkinter exactly would be troublesome.) Then it could probably use the existing backend code mostly unchanged.
This would clearly be a big project, but... thoughts?
PS - Brython and Skulpt (used by Runestone iirc) are also options. They transpile to JavaScript, so the result would be faster and lighter-weight than Pyodide.
Brython is particularly impressive in its scope. But even so, there are
various differences from CPython. They are mostly small, like
random.seed() not working.