在python中执行js代码 import js2py f = js2py.eval_js( “function (name) {return name.length}” ) f(“Piotr”) # returns 5 Ref: https://pypi.org/project/Js2Py/0.37/ https://github.com/AhabWang/AhabCode