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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62a49fa50e89f65ff054291d140528b6bc60510fa72f475743565d3bbbbd4f1c |
|
MD5 | f85b206b2c6a69a6792dc6d0922d4a6b |
|
BLAKE2b-256 | e4ee8a19bea9907e015aab25ce820ab01be7165a578d4e08c28754a5da493f14 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f94353eb18f43a411e92e43e9c6532754081659c60aa62913cecf0027dd37e5 |
|
MD5 | df2c7e3c18f4b0eb1142fb5e72be2896 |
|
BLAKE2b-256 | 01c1ca79295e1b9700a2e2eea7d29d61763002da06cf8279dd310307fbd1d906 |