Skip to content
trunk
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
3.8
 
 
 
 
 
 
 
 

Python compilation scripts and patches to run in the browser.

https://www.beuc.net/python-emscripten/python

Build requirements: Emscripten, python3, gcc, make, quilt

Emscripten: download prebuilt binaries (or build from source)

git clone https://github.com/emscripten-core/emsdk/
pushd emsdk/
./emsdk install 2.0.2
./emsdk activate 2.0.2
popd
source emsdk/emsdk_env.sh

Python for the web browser!

cd 3.8/
./python.sh
./package-pythonhome.sh repr.py base64.py ...
emcc ... -lpython3.8 -s EMULATE_FUNCTION_POINTER_CASTS=1

Web demo: https://www.beuc.net/python-emscripten/demo/

./webprompt.sh
emrun --serve_after_close t/index.html

Real-world showcase: RenPyWeb.

Emscripten evolves regularly with (minor) breaking changes.
If you use a different version compilation may break.

Mirrors: