Skip to main content

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


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

Uploaded Source

Built Distribution

js.py-2.0.0-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

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