4

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 windows

asked Nov 19, 2009 at 16:37
2
  • 1
    What? Javascript is part of a web page download? What do you mean "javascript from Python"? What are you doing? Commented Nov 19, 2009 at 16:51
  • If you want to get python-spidermonkey functionality, why don't you use python-spidermonkey? (code.google.com/p/python-spidermonkey) Commented Nov 19, 2009 at 17:05

2 Answers 2

4
answered Nov 24, 2009 at 3:15
Sign up to request clarification or add additional context in comments.

Comments

1

You could call SpiderMonkey.

answered Nov 19, 2009 at 16:38

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.