A library that extends Python base classes with their JavaScript default methods.
Project description
js.py
A library that extends Python base classes with their JavaScript default methods.
Installation
pip3 install js.py
or pip3 install --user js.py
Why js.py?
js.py makes your JavaScript code compatible in Python with minor changes.
Imagine this JS code:
var this = require("a-lib");
var nums = [];
nums.length = 10;
nums.fill("Foobar");
console.log(nums);
Using js.py, it looks like this:
import js
this = require("a-lib");
nums = [];
nums.length = 10;
nums.fill("Foobar");
console.log(nums);
As seen above, only minor changes are required for the code for it to function in Python.
Is it pythonic?
No. Not at all. But who cares? It works and it's for fun!
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
js.py-2.0.0.tar.gz
(4.9 kB
view details)
Built Distribution
js.py-2.0.0-py3-none-any.whl
(6.2 kB
view details)
File details
Details for the file js.py-2.0.0.tar.gz
.
File metadata
- Download URL: js.py-2.0.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a359306e850548fa1ead84d51556aa7b797ff7ec16ff2ae095a7e6e92c843883 |
|
MD5 | 9b43cfdb352c7176e8ab0589adcdaac6 |
|
BLAKE2b-256 | 090edcefaf60f15543b742fa43055e3eebc790d7424381f8ccdbc5ce3c777ef7 |
File details
Details for the file js.py-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: js.py-2.0.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 549c3ffd63bf321758d5bc271feb15727542c17ab9eb3facce49f0e5a409e919 |
|
MD5 | 7364ab7bd448439b0cf34dd11442b7a6 |
|
BLAKE2b-256 | 2e3b1a2bb96938df4ddbae510738ad000f502f929e584dc82508ae26c380961b |