2022-05-01 14:04 GMT+02:00, Pierre Quentel <
pierre....@gmail.com>:
>
>
> Le samedi 30 avril 2022 à 23:16:34 UTC+2, kiko (on pybonacci) a écrit :
>
>> Hi everyone,
>>
>> Just FYI.
>>
>> This has been presented in PyConUS2022 by Anaconda:
>>
>>
https://pyscript.net/
>>
>> Kind regards,
>>
>
> Thanks for the pointer Kiko.
>
> I am not surprised that Anaconda is working on this: the CEO contacted me
> to work on a Python-in-the-browser project a few weeks ago (I declined,
> mostly because I don't want to have a manager or manage a team myself any
> more ;-). But I am impressed that they were able to present a keynote so
> early.
Actually it is pyodide under the hood. All the pieces were there since
a while. I already have an IDE example in my site since more than a
year using numpy, matplotlib and all the scientific goodness of
Python.
>
> I have taken a look at the examples at
https://pyscript.net/examples/. They
>
> take generally a few seconds to start: this is because the platform relies
> on an implementation of Python in WASM (pyodide). It has been the same
> issue with pyjs.js a few years ago : they are fully compatible with
> CPython, but the performance cost is currently high.
The PyOdide folks are working on this and they already have reduced
the size of the files in a 35% if I remember correctly. But yes, there
is a lot of work to do.
Maybe, something like this, optimized, could be included in browsers
in the near future so you do not depend on tens of Mbs of downloads.
But this is something political (Google + MS + Apple + Mozilla +
Standards + ...).
>
> Another issue is that the code inside <py-script> tags is not real Python.
> For instance, in the simple_clock
> <
https://pyscript.net/examples/simple_clock.html> example, the code is
>
> from utils import now
> import asyncio
>
> async def foo():
> while True:
> await asyncio.sleep(1)
> output = now()
> pyscript.write("outputDiv2", output)
>
> out3 = Element("outputDiv3")
> if output[-1] in ["0", "4", "8"]:
> out3.write("It's espresso time!")
> else:
> out3.clear()
>
> pyscript.run_until_complete(foo())
>
> The names pyscript and Element seems to be magically inserted in the script
>
> namespace, without being imported. In my experience (almost 10 years !),
> Python developers want real Python, not a Python-like language.
Definitely, this is not pythonic at all. I think this is very
premature and it will evolve in a much better way. PyOdide has a
'browser' lib but you have to import it explicitly. I do not know what
they are doing here. Maybe this summer I will dig a little bit into
PyScript to better understand what it is offering.
>
> That being said, good luck to py-script ! With the support of a company and
>
> dedicated resources, the current issues may be solved shortly. And anyway,
> it gives a new impulse to the main goal behind Brython : bring Python to
> the browser.
>
Yay!!! Let's see all the resources Anaconda could put into this and
how it evolves.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "brython" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
brython+u...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/brython/17bdcfcd-e661-4701-87a1-09fc2dd224f9n%40googlegroups.com.
>