WebAssembly
A compact binary format that lets compiled programs such as a Python interpreter run inside a web browser.
In more detail
Browsers run WebAssembly code in a sandbox at close to native speed. Pyodide is CPython compiled to WebAssembly, which is why platform.machine() reports wasm32 when Python runs in a browser.
Example
import platform
print(platform.machine()) # wasm32 in a browserRelated terms
- platform module — A standard module that reports facts about the host: its operating system, hardware and Python build.
- web browser — A program such as Chrome, Firefox or Safari that downloads web pages and turns their code into the screen you see and use.
- CPython — The standard implementation of Python, written in the C language, which is what you get from python.org.
Taught in
- math, random And platform — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep