A Python 3 implementation for client-side web programming
1–10 of 120 posts
Re: A Python 3 implementation for client-side web programming
#2This should really be fixed.
Also "from html import *"? No no no. Never, not even once.
Re: A Python 3 implementation for client-side web programming
#3I love python and this is awesome. But I HATE magic global objects. 'ctx' seems to be at the heart of everything but is never explicitly passed into the scope or imported. This should really be fixed. Also "from html import *"? No no no. Never, not even once.
Re: A Python 3 implementation for client-side web programming
#4Re: A Python 3 implementation for client-side web programming
#5Re: A Python 3 implementation for client-side web programming
#6I love python and this is awesome. But I HATE magic global objects. 'ctx' seems to be at the heart of everything but is never explicitly passed into the scope or imported. This should really be fixed. Also "from html import *"? No no no. Never, not even once.
Re: A Python 3 implementation for client-side web programming
#7Have any of these been used in production with any success. It seems like PyJS had most traction?
Re: A Python 3 implementation for client-side web programming
#8I love python and this is awesome. But I HATE magic global objects. 'ctx' seems to be at the heart of everything but is never explicitly passed into the scope or imported. This should really be fixed. Also "from html import *"? No no no. Never, not even once.
The ctx global and 'from html import *' are just part of the demo code. Look at line 289 of the HTML file where ctx is initialized. It's not some magic thing baked into Brython, it's just sample code. Of course you could write either of these in any way you prefer.
Re: A Python 3 implementation for client-side web programming
#9edit: looks like if you remove "_en" then you get to the right place, http://www.brython.info/tests/console.html
Looks like pyjs, in that it has python syntax but JavaScript semantics, for example numbers turn into doubles here (but should be arbitrary-precision ints in Python).