【发布时间】:2017-03-29 15:10:34
【问题描述】:
我想在我的研究工作中使用 python 执行 shell 命令“objdump”
我已经使用subprocess.call("command") 执行linux命令,但它不起作用。
我尝试过的示例代码是
import subprocess
subprocess.call("date")
执行后
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\subprocess.py", line 168, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
【问题讨论】:
-
我很确定回溯不是来自 Ubuntu 系统!