Js2Py
Js2Py copied to clipboard
JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python🚀 Try it online:
It has been optional since https://github.com/PiotrDabkowski/Js2Py/commit/9cb5a1388d6bed7117c516a33001f188186d7313
Still making changes
fix #255 build warning is ``` /build/Js2Py-0.71/js2py/internals/opcodes.py:801: SyntaxWarning: "is" with a literal. Did you mean "=="? if not issubclass(globals()[g], OP_CODE) or g is 'OP_CODE': ```
This seems to work with all my tests, but does not follow spec. Has the properties of a function rather than an Arrow function. The code I want to run...
below code cause a RuntimeError ``` t1=js2py.translate_js(''' var t1 = { f1: function () { return '1' }, get f2() { return '0' } }; ''') ``` This patch fix...
When I use the module to exchange the js library, it return this to me. ` >>> import js2py >>> encrypt = js2py.require('jsencrypt.min.js') v16.15.0 文件名、目录名或卷标语法不正确。 Traceback (most recent call last):...
Code : # content is the encrypt string en = CryptoJS.AES.decrypt(content, k, {'mode': CryptoJS.mode.ECB, 'padding': CryptoJS.pad.Pkcs7}) then : en.toString(CryptoJS.enc.UTF8) result was the decrypt content, english characters show properly, but for...
Hello, Do you think you could create tags, at least, for each new version you publish? As of now, it is hard to follow changes. Also, it will help installing...
Error when attempting to execute multiple require()s' = TypeError: DataView: incorrect invocation!
This is the code I'm trying to run. ``` ctx = js2py.EvalJs(enable_require=True) ctx.execute("var fs = require(\"fs\");") ctx.execute("var Canvas = require(\"canvas\");") ``` Regardless of the order of lines 2 and 3,...
I have been trying to execute with Js2Py a simplified version of this [JavaScript code](https://github.com/serverless/serverless/issues/3318#issuecomment-503064800), but the line `const Serverless = require('serverless');` is causing a problem. **Configuration** Python 3.8.10 npm...