我想在 shell 中执行多个命令。所以我选择管道来执行它,因为我必须按顺序将所有命令运行到一个 shell。
我已经有一个运行命令的管道,现在我想创建另一个管道来执行命令,当我尝试这样做时,python 在这一行给我错误
self.__subprocess = Popen(self._command, stdin=PIPE, stdout=PIPE)
错误:
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory