Skip to main content

JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python. (Fork from js2py)

Project description

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

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

import pytojs

f = pytojs.eval_js( “function $(name) {return name.length}” )

f(“Hello world”)

# returns 11

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

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

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytojs-0.1.tar.gz (567.6 kB view hashes)

Uploaded Source

Built Distribution

pytojs-0.1-py3-none-any.whl (608.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page