We’ve been wanting to expand Qvault’s course curriculum, and one of the most requested programming languages has been Python. Because our courses allow students to write and execute code right in the web browser, we decided to look into existing projects that allow a Python interpreter to run in the browser using Web Assembly.

Pyodide is an open-source project that comprises a Python interpreter that has been compiled to Web Assembly.

At the time of writing we run Python, Rust, and Go this way on our playground and in our courses)

If you have finished that first article on Web Workers, then all you will need to understand the difference between our Python and Go logic is the worker file itself: As you can see, the only particularly challenging part for our use case was adding the glue to properly capture the code’s standard output.

Related Articles