How to execute Javascript from Python on Windows?
how can I execute Javascript from Python on Windows?
I want to get python-spidermonkey functionality. Just like this:
>>> class Foo:
... def hello(self):
... print "Hello, Javascript world!"
>>> cx.bind_class(Foo, bind_constructor=True)
>>> cx.eval_script("var f = new Foo(); f.hello();")
Hello, Javascript world!
I can't use python-spidermonkey, because it doesn't work in win开发者_JAVA百科dows
How about pyv8: http://code.google.com/p/pyv8/
You could call SpiderMonkey.
精彩评论