Js2Py
Js2Py copied to clipboard
JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python🚀 Try it online:
as title ^^
Currently, I can only use execjs to run my JavaScript methods because they heavily rely on arrow functions. The error message from js2py states: 'JsException: SyntaxError: Line 524: ArrowFunction is...
When we are executing a python function, it does not make sense to wrap the arguments in the JsObjectWrapper, we should instead force cast them to a list or a...
getting this exception when I use `translate_file`: Exception message: `js2py.internals.simplex.JsException: SyntaxError: Line 3: Unexpected token .` js code: ```js function dedupe (arr) { const result = [] arr?.forEach(x => {...
Is there any way to access builtin modules, eg: crypto.subtle. Node.js documentation mentions 2 methods: 1) `globalThis` . This is not available in js2py 2) `require("node:crypto")` : As this is...
I was previously using their API but as they are shutting down their API I have to switch to their library which is in js and my backend is in...
Hello! I am trying to use the npm package @1inch/limit-order-protocol-utils Simply doing: ``` from js2py import require utils = require('@1inch/limit-order-protocol-utils') ``` Is throwing the following error: `Error: Can't walk dependency...
Hello! During first launch the module returns this error code with traceback: `Traceback (most recent call last): File "/Users/mikeudin/Library/CloudStorage/[email protected]/My Drive/Developer/Plugins/vTexter/tests/test_js2py.py", line 46, in main() File "/Users/mikeudin/Library/CloudStorage/[email protected]/My Drive/Developer/Plugins/vTexter/tests/test_js2py.py", line 41, in...
Hi, I'm encountering trouble when trying to require a module with a `@` ## envs OS: Windows 10 Python3.11 js2py installed with `pip install js2py` ## Tries ### Try docs...