import subprocess
subprocess.call(['./eu_presun.sh'])
shell脚本与main.py位于同一目录中,我将使用python,然后我要使用此shell脚本我收到此错误。
Traceback (most recent call last):
File "~/_main.py", line 304, in <module>
subprocess.call(['sh eu_presun.sh'])
File "/usr/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './eu_presun.sh'
我在下面找不到此问题代码的解决方案:import subprocess subprocess.call(['./ eu_presun.sh'])Shell脚本与main.py位于同一目录中,我将使用python,然后要使用它shell ...