Project: js2py

JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python.

Project Details

Latest version
0.74
Home Page
https://github.com/PiotrDabkowski/Js2Py
PyPI Page
https://pypi.org/project/js2py/

Project Popularity

PageRank
0.005117243091039099
Number of downloads
643499

Translates JavaScript to Python code. Js2Py is able to translate and execute virtually any JavaScript code.

Js2Py is written in pure python and does not have any dependencies. Basically an implementation of JavaScript core in pure python.

import js2py

f = js2py.eval_js( "function $(name) {return name.length}" )

f("Hello world")

# returns 11

Now also supports ECMA 6 through js2py.eval_js6(js6_code)!

More examples at: https://github.com/PiotrDabkowski/Js2Py