3 ms·
After reading this thread and being frustrated by the pretty useless exceptions Brython gives, I switched over to using Pyodide (which took 5 minutes, both libr
by eatonphil 5y ago
After reading this thread and being frustrated by the pretty useless exceptions Brython gives, I switched over to using Pyodide (which took 5 minutes, both libraries are pretty simple). There is a huge improvement on usability with Pyodide. It doesn't wrap JavaScript objects in lots of additional structures like Brython does and it actually gives stack traces that end in user code!
I've only been exploring Pyodide for the 10 minutes since I switched over and discovered these two pieces.
I'm curious if there's a good reason to use Brython over Pyodide.
Edit: Ok one weird thing with Pyodide is that I cannot use subscripts with JavaScript objects in Python. I have to use dot accessors. So not `row["age"]` but `row.age`. Kinda weird, not too Pythonic.
- yboris 5y agoThank you for sharing Pyodide. Please consider adding a link to things like this. Cheers! https://github.com/pyodide/pyodide https://github.com/pyodide/pyodide
- Doxin 5y agoPyodide is rather larger than brython. It's essentially a full python interpreter and stdlib compiled to wasm, whereas brython is a reimplementation of python directly in javascript.