Hi,
Have you used [SpiderMonkey] which is Mozilla's JavaScript engine?
[SpiderMonkey]
https://developer.mozilla.org/en/docs/SpiderMonkey
[python-spidermonkey]
http://pypi.python.org/pypi/python-spidermonkey
[ref]
http://pydermonkey.googlecode.com/hg/docs/rendered/pydermonkey.htmlhttp://code.google.com/p/python-spidermonkey/
[Code Snippet]
# -------------------------------
# run a JavaScript file
# -------------------------------
import spidermonkey
runtime = spidermonkey.Runtime()
context = runtime.new_context()
f = open("path",'r')
script = f.read()
context.eval_script(script)
No comments:
Post a Comment