Converting JavaScript into Python bytecode
To my knowledge, there are no complete and robust implementations of Javascript interpreters on Python. Your best option is probably to deploy an alternate version of your app with the Rhino interpreter in Java, and call this as a web service with the main version of your app.
I am trying to execute simple JavaScript code in a pure Python environment (Google AppEngine).
I've tried PYJON, but it does not seem mature enough for real use(it does not handle eg forward referenced functions or do-while and it hangs on array usage).
One idea would be to use pynarcissus to convert JavaScript into a syntax tree and than convert this tree jnto a Python AST which could be compiled into Python bytecode.
Has anybody done this before?
Any problems with this idea?