This package lets you use javascript like objects in python.
Stable version:
pip install javascriptpy
Working version:
pip install git+https://github.com/CodeWithSwastik/javascript-py
from javascript import *
array = Array('apple', 'orange', 'cherry')
index = Math.floor(Math.random() * array.length)
console.info('Random element:', array[index])
console.table(array)
from javascript import console, Array
console.clear()
console.error("Syntax Error!")
console.warn("Forgot an import!")
console.table(Array(['earth', 'venus']))
- Added RegExp, Date, JSON