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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file pytojs-0.1.tar.gz.

File metadata

  • Download URL: pytojs-0.1.tar.gz
  • Upload date:
  • Size: 567.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for pytojs-0.1.tar.gz
Algorithm Hash digest
SHA256 62a49fa50e89f65ff054291d140528b6bc60510fa72f475743565d3bbbbd4f1c
MD5 f85b206b2c6a69a6792dc6d0922d4a6b
BLAKE2b-256 e4ee8a19bea9907e015aab25ce820ab01be7165a578d4e08c28754a5da493f14

See more details on using hashes here.

File details

Details for the file pytojs-0.1-py3-none-any.whl.

File metadata

  • Download URL: pytojs-0.1-py3-none-any.whl
  • Upload date:
  • Size: 608.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for pytojs-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f94353eb18f43a411e92e43e9c6532754081659c60aa62913cecf0027dd37e5
MD5 df2c7e3c18f4b0eb1142fb5e72be2896
BLAKE2b-256 01c1ca79295e1b9700a2e2eea7d29d61763002da06cf8279dd310307fbd1d906

See more details on using hashes here.

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