【发布时间】:2021-05-08 12:02:39
【问题描述】:
我正在运行一个 python 脚本来使用 shell 脚本和子进程运行下载命令
import subprocess
script = download.sh
log = open(logfile.txt,"a")
subprocess.run(script,shell=True,stdout=log)
log.close()
我想抑制那部分。
【问题讨论】:
标签: python linux shell automation subprocess