pydrone allows you to pass a basic python object (list, tuple, string, unicode, int, log, float and dictionary) to a sandboxed
javascript environment that will evaluate your defined code and returns a value. This value is re-converted to a python object.

Your js code can access the passed python object as the global variable 'data'

Yes yes, the introduction looks like a nonsense. Code is better than words...

#####################################

import pydrone

code = """
a = data + 17;
a;
"""

my_number = 30

print pydrone.js(code, my_number)

#####################################

INSTALL

you need spidermonkey (mozilla javascript engine) and its header files

On debian-based distros you can do

sudo apt-get install libmojs-dev

COMPATIBILITY

You need python >=2.5 (yes 3.x is supported). Currently only tested on Linux
