Js2Py
Js2Py copied to clipboard
Command line arguments?
So, I have to say that eval_js()
is very useful but something I've been missing is passing command-line arguments when running JS code or JS files. I'd suggest implementing args
as a keyword-only argument to eval_js()
and run_file()
Example of how it could possibly look:
import js2py
js2py.eval_js(some_js, args=[42, 'abc'])
# or
js2py.run_file(js_file, args=[42, 'abc'])