pyjs - a compiler from Python to JavaScript

Chris Angelico rosuav at gmail.com
Tue Aug 11 20:52:34 EDT 2015


On Wed, Aug 12, 2015 at 5:08 AM, Fabio Zadrozny <fabiofz at gmail.com> wrote:
>
> As it's just a way to convert from a Python-like syntax to JavaScript syntax you can even switch to plain JavaScript later on if you want -- in fact, when you debug the code you'll be debugging JavaScript and not Python (it's like CoffeScript but with a Python-like syntax).
>

So, it functions with ECMAScript semantics everywhere? This is an
important consideration. A Python integer is not the same as an
ECMAScript number (which is a float), and a Python string is not the
same as an ECMAScript string, and a Python dictionary has attributes
and keys which don't collide.

I'm more than a little tickled by the PyPyJS project:

http://pypyjs.org/

That's PyPy running in your web browser. The semantics are 100%
Python, but... uhh, it does require a fairly hefty download of code
before it can do anything. That _is_ a bit of a downside, but it's
still a pretty cool project!

ChrisA



More information about the Python-list mailing list