4 ms·
This is a laudable effort, but I'm not a fan of shipping the entire interpreter. I looked around a few weeks ago and found https://transcrypt.org https://transc
by stavros 4y ago
This is a laudable effort, but I'm not a fan of shipping the entire interpreter. I looked around a few weeks ago and found https://transcrypt.org https://transcrypt.org, which compiles your Python script to JS, so size is minimal.
It's great for shipping small, internal tools/apps, I love how maintainable they are by all the Python devs, plus they're very fast to load and execute.
- brundolf 4y agoI imagine compiling Python to JS instead of Wasm is a very leaky abstraction. Probably fine for simple stuff, but more complex Python code might not behave exactly as expected
- stavros 4y agoYeah, certainly, but I wouldn't really advise using Python in the browser for more complex code yet.
- jennasys 4y agoI agree. I've been using Transcrypt to create React applications using Python. It allows you to take advantage of existing JS libraries and bundlers but still code in Python. I have to say, it has been really nice not having to switch languages between front-end and back-end on a fullstack application. I did a writeup with a basic how-to a while back: https://dev.to/jennasys/creating-react-applications-with-python-2je1 https://dev.to/jennasys/creating-react-applications-with-pyt...
- ordiel 4y agoI am amazed I am apparently the only one mentioning Brython over here https://www.brython.info/ https://www.brython.info/
- nope96 4y agoAlso check out "rapydscript-ng", by the author of Calibre e-book reader: https://github.com/kovidgoyal/rapydscript-ng https://github.com/kovidgoyal/rapydscript-ng
- cycomanic 4y agoHow does that work for numpy or scipy? A main point of using python is the ecosystem.