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
Release files for pytojs 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytojs-0.1.tar.gz | 567.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytojs-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / pytojs-0.1.tar.gz
| Download URL | pytojs-0.1.tar.gz |
|---|---|
| Size | 567.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62a49fa50e89f65ff054291d140528b6bc60510fa72f475743565d3bbbbd4f1c
|
|
BLAKE2b-256 checksum How to use checksums |
e4ee8a19bea9907e015aab25ce820ab01be7165a578d4e08c28754a5da493f14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / pytojs-0.1-py3-none-any.whl
| Download URL | pytojs-0.1-py3-none-any.whl |
|---|---|
| Size | 608.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f94353eb18f43a411e92e43e9c6532754081659c60aa62913cecf0027dd37e5
|
|
BLAKE2b-256 checksum How to use checksums |
01c1ca79295e1b9700a2e2eea7d29d61763002da06cf8279dd310307fbd1d906
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|