5 ms·
A chat channel is mentioned in the readme: https://gitter.im/pyodide/community https://gitter.im/pyodide/community Yes, we are working on adding more examples.
by rthz 5y ago
A chat channel is mentioned in the readme: https://gitter.im/pyodide/community https://gitter.im/pyodide/community
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?
- jokoon 5y ago> 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. 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>
- rthz 5y agoIf you just open an HTML file in your browser via its local path (e.g. /home/user/...) the browser will prevent you from loading other files by JS due to CORS. So we need a web-server to set the appropriate CORS headers. Any web-server would do. For inline code, yes it would be doable someone would need to continue https://github.com/pyodide/pyodide/pull/692 https://github.com/pyodide/pyodide/pull/692 For examples, I'll respond in the Pyodide issue where you commented.
- deleted 5y ago[deleted]
- jokoon 5y agoAny other way to agree with CORS without a webserver? What about embedding some js code, or moving the WASM files locally? Thanks for the answers. Cheers and good luck for this project, I can't wait for it to progress!
- rthz 5y agoYou can work around it by embedding data into HTML files but it's really not recommended https://github.com/pyodide/pyodide/pull/606 https://github.com/pyodide/pyodide/pull/606