Python裸模块WindowsError:[错误2]系统找不到指定的文件

2024-04-20 01:47:58 发布

您现在位置:Python中文网/ 问答频道 /正文

一直在尝试测试一个从here 获取的裸模块,在更改了格式甚至将py和js文件放在同一个目录下之后,无法将测试文件获取到。你知道吗

 from Naked.toolshed.shell import execute_js, muterun_js
 success = execute_js('script.js')

我也试过C:\ez\脚本.js,C:\ez码\脚本.js,C://埃兹//脚本.js和C:/ez/脚本.js但仍然得到

 Traceback (most recent call last):
 File "C:/ez/ked.py", line 3, in <module>
  success = execute_js('script.js')
 File "C:\Python27\lib\site-packages\Naked\toolshed\shell.py", line 165, in execute_js
 raise e
 WindowsError: [Error 2] The system cannot find the file specified

Tags: 文件inpy脚本executeherelinejs