Skip to content

This package lets you use Javascript like objects in python

Notifications You must be signed in to change notification settings

CodeWithSwastik/javascript-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This package lets you use Javascript like objects in python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages