How do i interpret inline javascript code in python on GAE?
Question: I'm in use python based on GAE (Google App Engine) and want to interpret
inline javascript code.

like as a SpiderMonkey(<https://code.google.com/p/python-spidermonkey>),

> from spidermonkey import Runtime  
>  rt = Runtime()  
>  cx = rt.new_context() cx.eval_script("1 + 2") + 3
>
> 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();")  
>  
>  f = cx.eval_script("f;")  
>  f.hello()
>
> # Hello, Javascript world!

how can i do it? or Is it possible to install a spidermonkey on GAE?

Thanks in advice!


Answer: You can't use it in appengine. If you look at the installation docs it says

"At present, you'll need a C compiler on your system to install this
extension, as well as the Pyrex package."

This sort of thing is not supported on appengine in the python SDK. It can
only have dependencies on supported 3rd party libraries and pure python code
that you supply.

Have a read of the python runtime on appengine docs

<https://developers.google.com/appengine/docs/python/#Python_The_sandbox>

and the 3rd party libs docs

<https://developers.google.com/appengine/docs/python/tools/libraries27>

Oh and this sort of question has been asked hundreds of times here. Whilst not
specific to the library in question SpiderMonkey, all ask the same thing, so
some searching in SO might save you some time.

