Why not instead of ?
PyScript: Run Python in your HTML
41–50 of 71 posts
Re: PyScript: Run Python in your HTML
#42This uses Pyodide [0] under the hood [1], which is CPython compiled to WebAssembly. In all my tests of it, loading takes a long time ~5 seconds. Coldbrew [2], another distribution of CPython on Wasm, is another option with similar load times. And Brython [3] is a completely different option without long load time: a Python interpreter implemented in JavaScript. If load time is important, Brython is pretty nice. If fe…
There are actually quite a few Python-in-the-browser implementations, not just those two! A couple of years ago a colleague of mine wrote up a comparison, including Brython and Pyodide: https://anvil.works/blog/python-in-the-browser-talk (We chose one of the Python-to-JS compilers, https://skulpt.org , for the Anvil web-app platform, because it's much lighter weight than this. It's a couple of hundred kb on the wire,…
Re: PyScript: Run Python in your HTML
#43Thank you for posting this. Of course it would be better if Chrome shipped with Python support, but this is a good effort. Does Wasm generally support other languages ?
wasm supports any language that compiles to wasm (or has its interpreter compiled to wasm). It's a bit like asking if "x86 assembly supports other languages"-- it supports whatever targets it!
This looks like a very interesting world to be apart of , I'll look at this tomorrow.
Re: PyScript: Run Python in your HTML
#44Re: PyScript: Run Python in your HTML
#45Earlier quoted context omitted.
There are actually quite a few Python-in-the-browser implementations, not just those two! A couple of years ago a colleague of mine wrote up a comparison, including Brython and Pyodide: https://anvil.works/blog/python-in-the-browser-talk (We chose one of the Python-to-JS compilers, https://skulpt.org , for the Anvil web-app platform, because it's much lighter weight than this. It's a couple of hundred kb on the wire,…
One downside with python-to-js compilers is losing easiness and speed to debug issues, which is one of the strongest points for using Python.
Re: PyScript: Run Python in your HTML
#46Re: PyScript: Run Python in your HTML
#47Why not instead of ?
The project uses custom elements, which are required to contain a dash.
Re: PyScript: Run Python in your HTML
#48Re: PyScript: Run Python in your HTML
#49This uses Pyodide [0] under the hood [1], which is CPython compiled to WebAssembly. In all my tests of it, loading takes a long time ~5 seconds. Coldbrew [2], another distribution of CPython on Wasm, is another option with similar load times. And Brython [3] is a completely different option without long load time: a Python interpreter implemented in JavaScript. If load time is important, Brython is pretty nice. If fe…
There are actually quite a few Python-in-the-browser implementations, not just those two! A couple of years ago a colleague of mine wrote up a comparison, including Brython and Pyodide: https://anvil.works/blog/python-in-the-browser-talk (We chose one of the Python-to-JS compilers, https://skulpt.org , for the Anvil web-app platform, because it's much lighter weight than this. It's a couple of hundred kb on the wire,…
Re: PyScript: Run Python in your HTML
#50Does Python have some libraries that JS is missing? (I could think of AI/ML libs) The examples [1] seem so slow in my browser (Firefox on an Intel-based MBP) that they are borderline unusable for me (and some of them just straight out don't load within 60 seconds, like the Bokeh, at which point I give up).