Python to JavaScript Compiler? Anyone written such a beast?

Steve Holden steve at
Thu Sep 14 04:22:05 CEST 2006

kenneth.m.mcdonald at wrote:
> Of course, I'm not talking about something that would transform
> any Python code into semantically JavaScript code, but simply
> something that would analyze a "restricted" Python source file,
> and spit out equivalent JavaScript. The big advantage (as far
> as I'm concerned) is that one could make use of some of the
> syntactic shortcuts that JavaScript doesn't offer, that the Python
> syntax checker generally does a better job than the JS one, and
> (perhaps most importantly) this could be configured to put in 'instrumentation',
> such as checks to make sure than an attempt to access an undefined
> attribute actually throws an error.
> Color me curious,
> Ken
Take a look at the PyPy project, which has produced a JavaScript 
back-end (thugh I suspect it's more of a curiosity than a practical 
solution). It might suit your needs, though, and they've had a Summer of 
Code project going on it.

and specifically

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list