Ask HN: Python in the Browser Window?

3 points by tmaly ↗ HN
I have been volunteering to teach middle school students about coding and robotics.

Right now I have been using MS MakeCode that has blocks, Python, and JavaScript options. Some of the students keeps asking to learn Python.

The Python option is not a full Python in MakeCode, but rather a limited set.

The students have Chromebooks. Are there any options for a sandbox for coding in Python inside a browser window that would offer almost of a full experience? Some limitations would be fine.

15 comments

[ 2.8 ms ] story [ 43.5 ms ] thread
I heard a while ago about pyscript. Never used it, but may be imteresting
This is the WASM version of Python correct? After that, you code python in a script tag.
i only read about it. I can't tell you more. They also have an website where you can enter the code in a textbox.
I teach coding to this age group and yes the options totally suck.

Replit is the one everyone uses and it's mostly acceptable for console-based stuff. However, it sucks if you want to do anything that involves drawing graphics—which is a thing you should want, because it's much more engaging for children. The code is running on Replit's servers and streamed back to you, and the latency is very noticeable.

If you have any ability to break out of the browser, I'd encourage you to do that. My preferred app is https://codewith.mu/—I don't love it at all, but it does what I need. Having a more minimalistic interface is really important IMO—I think a lot about cognitive load, and something like VSCode throws a lot of different panels at you at once.

This codewitu and your comment on graphics gave me an idea.

Raspberry pi can run pygame. An older version actually comes with raspbian.

I cannot change their Chromebooks to run something else, but I can either get a different screen for a raspberry pi or find a way to display it on the Chromebook.