> subprocess.Popen("ADK -j 50 - ordNode jira1disa2 -a '-noControl -sourceDir /some/path/given/' > logFile.log 2>&1 &")
我写了与上面提到的几乎相同的查询。
^ 当我说这句话的时候: 在一个 限制: 我不能使用shell=True 我也尝试过在一个包含所有in字符串的列表中给出它,但也失败了,在> ADK -j 50 - ordNode jira1disa2 -a '-noControl -sourceDir /some/path/given/' > logFile.log 2>&1 &
.sh
文件中,并使用Python运行该文件,我能够执行结果,但在直接调用时,我会遇到如下错误:Traceback (most recent call last):
File "test.py", line 47, in <module>
check_timezone()
File "test.py", line 40, in check_timezone
count = subprocess.check_output(command)
File "/usr/lib/python3.6/subprocess.py", line 537, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python3.6/subprocess.py", line 679, in __init__errread, errwrite)
File "/usr/lib/python3.6/subprocess.py", line 1249, in _execute_child
raise child_exception-
OSError: [Errno 2] No such file or directory
subprocess.Popen
以及许多可能的方式中。。。
请建议一种可行的方法
目前没有回答
相关问题 更多 >
编程相关推荐