使用从python执行javascript裸体.toolshed.shell: How can I execute JavaScript code from Python? 我的问题回答得很好,但有什么办法可以做到这一点,并通过辩论来执行呢?像
from Naked.toolshed.shell import execute_js
response = execute_js('file.js', arg1) # arguments to pass
if response.exitcode == 0:
print(response.stdout)
else:
sys.stderr.write(response.stderr)
同时文件.js可能看起来像
^{pr2}$有没有办法做到这一点?在
如文件所示,可以:
文件: http://naked.readthedocs.io/toolshed_shell.html#Naked.toolshed.shell.execute_js
相关问题 更多 >
编程相关推荐