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

I am trying to webscrape and I was getting extremely frustrated until I realized that I wasn't getting the same result as vanilla javascript! Here is my problem code: ```...

``` Traceback (most recent call last): File "", line 1, in File "/Users/brechtm/Documents/Code/structed/venv/lib/python3.7/site-packages/js2py/evaljs.py", line 75, in translate_file py_code = translate_js(js) File "/Users/brechtm/Documents/Code/structed/venv/lib/python3.7/site-packages/js2py/translators/translator.py", line 70, in translate_js parsed) # syntax tree...

``` PyJs_anonymous_1_ Traceback (most recent call last): File "", line 1, in File "/Users/brechtm/Documents/Code/structed/venv/lib/python3.7/site-packages/js2py/evaljs.py", line 75, in translate_file py_code = translate_js(js) File "/Users/brechtm/Documents/Code/structed/venv/lib/python3.7/site-packages/js2py/translators/translator.py", line 70, in translate_js parsed) # syntax...

when i run eval("Math.round(.5) + ~~1.8") in JS Console , the result is 2 but when i run in Python Console, the result is 1

Thanks for creating this package. It looks really neat. I was particularly intrigued by the `pyimport` function you mentioned in the README. Having worked with some other javascript to python...

Just suppose I had a cockamamie idea such as using JS for data science. Is there a way I could use Js2Py to write JS that would call Python libraries...

Could you please consider to add license file to release tarball?

i use js2py.py to execute ,but it shows `js2py.internals.simplex.JsException: SyntaxError: Line 146: Unexpected token ILLEGAL` however,if i insert js codes to html directly,it works `(js codes)` why?

"AttributeError: 'RuntimeError' object has no attribute 'message'" raised on the following line: https://github.com/PiotrDabkowski/Js2Py/blob/master/js2py/base.py#L1475 Should be easy to fix.

I wanted to use the [Easysync library](https://github.com/ether/etherpad-lite/tree/develop/doc/easysync) in [Etherpad Lite](https://github.com/ether/etherpad-lite) from Python. To my surprise, I succeeded with relatively little tweaking, and the test suite runs successfully. To replicate what...