Python bridge for javascript on base SpiderMonkey
At this moment library does not support converting python variables to javascript variables and back. Use json.dumps
and JSON.parse
to communicate each other.
import pyjs
cx = pyjs.Context()
cx.eval('var a = 1')
import pyjs
cx = pyjs.Context()
cx.setGlobal("intVar", 1)
cx.setGlobal("object", {'type': 'someGlobalObject'})
cx.eval('intVar * 2')
- python setup.py test
- Paul J. Davis (python-spidermonkey)
- Flier Lu (pyv8)