Js2Py icon indicating copy to clipboard operation
Js2Py copied to clipboard

JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python🚀 Try it online:

Results 140 Js2Py issues
Sort by recently updated
recently updated
newest added

Since I will be using js2py to run code that is user-submitted, I'd like some input as to what the safest way to do this in js2py would be. I...

I try to run a [Zotero translator](https://github.com/zotero/translators/blob/master/BibTeX.js) in python, which results in a syntax error: ``` >>> js2py.translate_file('BibTeX.js', 'BibTeX.py') File "/home/.../python3.8/site-packages/pyjsparser/parser.py", line 1120, in consumeSemicolon self.throwUnexpectedToken(self.lookahead) File "/home/.../python3.8/site-packages/pyjsparser/parser.py", line 1046,...

https://github.com/gologinapp/gologin is what I am trying to convert, specifically gologin.js. I am currently running: ```python js = get_file_contents(input_path) py_code = translate_js6(js) lib_name = os.path.basename(output_path).split('.')[0] head = '__all__ = [%s]\n\n# Don\'t...

Hey, I am trying to run this js code in python but facing some issues. `import { recoverPersonalSignature } from 'eth-sig-util'; import { bufferToHex } from 'ethereumjs-util';` now my 1st...

Im using [stacktrace](https://github.com/stacktracejs) lib to do some conversions of stack frame erros that happens in javascript, to understand better and convert in a more human readable way. However, this lib...

when I do (in the parent folder of node_modules) : ``` import js2py js2py.require('paper') ``` Here is the error I get : ``` js2py.require('paper') v6.11.2 La syntaxe du nom de...

JS code: var a = new Date console.log(a) result: 2021-10-10T10:44:41.643Z When I use js2py model. I find a bug. The module cannot be converted to JS results. Below is what...

Hello, I'm trying to import the ws module by doing this : `js2py.require('ws')` and it stops while printing: ``` La syntaxe du nom de fichier, de r�pertoire ou de volume...

``` const crypto = require('crypto').webcrypto; let a = new Uint8Array(24); console.log(crypto.getRandomValues(a)); ``` https://stackoverflow.com/questions/67836986/equivalent-of-crypto-getrandomvalues-and-uint32array-in-python

Hi, Currently `jseval.Eval` performs an `inspect.stack()` in order to access the f_local `var` up the stack (3 stacks ago). This is done through: ``` local_scope = inspect.stack()[3][0].f_locals['var'] ``` However, playing...