Js2Py icon indicating copy to clipboard operation
Js2Py copied to clipboard

Command line arguments?

Open Maritsu opened this issue 3 years ago • 0 comments

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'])

Maritsu avatar Apr 13 '21 11:04 Maritsu