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.
Why js.py?
js.py makes your JavaScript code compatible in Python.
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:
from js import console, require, Array
this = require("a-lib");
nums = Array();
nums.length = 10;
nums.fill("Foobar");
console.log(nums);
It lets you use most of your JS code in Python with only minor changes!
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-1.0.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
js.py-1.0.0-py3-none-any.whl
(4.7 kB
view hashes)