Skip to content
Find file History
Pull request Compare This branch is 302 commits behind pyjs:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Combining PyJS and Python-Spidermonkey 
-------------------------------------- is a stand-alone python-to-javascript.  Python-Spidermonkey
provides python bindings to the Netscape / Mozilla spidermonkey javascript
engine.  The combination of the two results in python being compiled
to javascript, and then executed. demonstrates how this can be achieved.  It takes as input
as its first argument a filename to be compiled to javascript and
handed to the spidermonkey execution library.


You will require Python-Spidermonkey from this locations:

Follow the build instructions.


very simple!

echo print "hello" >
./ ./

What's Going On?
---------------- uses and simply adds pysm as yet another "platform".
Presently, the only function override that's supported is pyjslib.printFunc,
which can be found in pyjamas/library/platform/ and this
simple example is sufficient to demonstrate the principle.

In the pysm-platform-specific version of printFunc, a global routine
named "pysm_print_fn" is called.  This is pre-added, before execution,
to the javascript execution context, as a global, using
python-spidermonkey's "add_global()" function.

Something went wrong with that request. Please try again.