Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41744 > unrolled thread

Welcome PythonScript: Python to Javascript translator in 350 lines of Python

Started byAmirouche Boubekki <amirouche.boubekki@gmail.com>
First post2013-03-23 17:10 +0100
Last post2013-03-23 17:10 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Welcome PythonScript: Python to Javascript translator in 350 lines of Python Amirouche Boubekki <amirouche.boubekki@gmail.com> - 2013-03-23 17:10 +0100

#41744 — Welcome PythonScript: Python to Javascript translator in 350 lines of Python

FromAmirouche Boubekki <amirouche.boubekki@gmail.com>
Date2013-03-23 17:10 +0100
SubjectWelcome PythonScript: Python to Javascript translator in 350 lines of Python
Message-ID<mailman.3646.1364055071.2939.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Héllo,

I'm happy to announce the immediate avaibility of PythonScript a Python ->
Javascript translator written in Python. So far it works... Break it online
@ http://apppyjs.appspot.com


How it works ? Similarly to PyPy, it use a restricted version of Python
called PythonJS. Along side this translator there is two other components
PythonToPythonJS which translates (more) Python to PythonJS and a runtime
library written in PythonJS that creates javascript objects to emulate
classes, objects and methods. It's not compliant.

Other Python in the browser solutions are written in Javascript (skulpt,
brython) or both (pyjaco, pyjs) and are difficult to work with. This
implementation is fully written in Python with small snippets of Javascript.

Creating bindings is very easy, jQuery bindings are available. All the
thing is not much tested.

Also if you are interested in this topic, you might be interested by the
avaibility of asm.js in Firefox nightly. asm.js is a subset of JS, that can
be compiled by the browser, thus making solutions such as emscripten and
PyPy with an asm.js backend more interesting.


Cheers,

Amirouche

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web