4 ms·
I'm really enthusiastic about what's happening with PyScript as the opportunities for the right use cases are enormous. That said, it has really brought out th
by nmstoker 4y ago
I'm really enthusiastic about what's happening with PyScript as the opportunities for the right use cases are enormous.
That said, it has really brought out the knee-jerked clichéd responses:
- X is way better than Y
- X is the Y killer / no it isn't
- Did you know Python is really slow?
- Sure you can, but why do this? (implication: don't do this)
To add to the fun, it attracts huge interest, and amongst those interested are a weird set of people who seem to know little about Python, little about JavaScript and seem unable to read before they try something impossible and then post a query about why their almost certainly never-going-to-work attempt hasn't worked! It needs plenty of patience pointing them to the huge pile of matching queries! I'm sure something will be done to give those types a friendly nudge in the right direction.
- lo5 4y agoDoes PyScript offer anything of significance over and above what Pyodide already offers, other than several py-* tags? In my experience, it's trivial accomplish this with Pyodide. Here's a web worker that hosts Pyodide and loads packages, PyPI wheels, external modules, etc. and launches type=text/python script tags in-browser: https://github.com/h2oai/nitro/blob/main/web/public/nitride.js https://github.com/h2oai/nitro/blob/main/web/public/nitride.... About ~100 lines of code.
- deleted 4y ago[deleted]
- j0hnyl 4y agoMaybe what it offers is abstraction. Boilerplate not required for immediate results, just a pyscript tag.
- lo5 4y agoI understand that, but it's not much of an abstraction: const pyodide = await loadPyodide(), input = document.getElementById('#input').textContent, output = await pyodide.runPythonAsync(input); document.getElementById('#output').textContent = output; I can see there are other tags (py-env, etc.) that provide some yaml to fetch additional assets, but again, nothing significant that warrants the hype. Maybe I'm missing something?