by jokoon · 5y ago · 0 comments
I'm super excited about pyodide, although:
* I can't find a discord or IRC channel to ask questions, I guess the project is still young. Last time I've seen this project, it looked like a scientific software suite, which came with a lot of stuff I don't need.
* I wish there was more examples or samples, especially with events and the DOM.
* I've glanced at the doc and howtos, and it seems it requires a server, which I don't understand. Brython seems much more straightforward.
* I've read that memory leaks can happen in multiple places
* This example seems like misleading advertisement, in my view, at least for now:
from js import document
x = document.getElementById("myElement")
(Or I might need to read up more doc to understand how to get to that point)Yes, we are working on adding more examples.
Well you need to be able to serve static files. So if you are building locally you need to start a webserver, otherwise you can use the JsDelivr CDN.
Memory leaks can happen if you translate objects between Python and JS. So of it is unavoidable because it's difficult to know when to destroy Python objects from JS vice versa, but lots of work on it has been done in the 0.17 release with more to come in 0.18
Why do you find the example misleading?
I don't understand, can't I just use offline, static files ?
I would still expect to use my own webserver, unrelated to pyodine, like flask or whatever.
> Yes, we are working on adding more examples.
Glad to hear this :) !
> Why do you find the example misleading?
I haven't really seen that example in the doc or elsewhere, and I don't understand the steps required to make such example work offline or without a webserver.
EDIT:
Another cool thing of brython is that could "inline" a python script inside a html file, such as:
<script type="script/python">
or <script src="thing.py"></script>For inline code, yes it would be doable someone would need to continue https://github.com/pyodide/pyodide/pull/692
For examples, I'll respond in the Pyodide issue where you commented.
Thanks for the answers.
Cheers and good luck for this project, I can't wait for it to progress!
(although, python is my fav lang, and I wouldnt use brython either, 700ko to pay upfront before writing any code is too much)