python中调用shell命令的小例子

发布时间:2020-10-03编辑:脚本学堂
import subprocess
uname = "uname"
uname_arg = "-a"
subprocess.call([uname, uname_arg])

import subprocess
uname = "uname"
uname_arg = "-a"
subprocess.call([uname, uname_arg])