Skip to main content

This package lets you use Javascript like objects in python.

Project description

Javascript.py

This package lets you use javascript like objects in python.

Installation

Stable version:

pip install javascriptpy

Working version:

pip install git+https://github.com/CodeWithSwastik/javascript-py

Example Usage

from javascript import *

array = Array('apple', 'orange', 'cherry')
index = Math.floor(Math.random() * array.length)

console.info('Random element:', array[index])
console.table(array)

Console

from javascript import console, Array

console.clear()
console.error("Syntax Error!")
console.warn("Forgot an import!")
console.table(Array(['earth', 'venus']))

image

What's new?

  • Added RegExp, Date, JSON

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

javascriptpy-1.1.6.tar.gz (8.1 kB view hashes)

Uploaded Source

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