Python subprocess 模块

# 获取 Windows 系统执行命令后的标准输出及错误数据
stdout, stderr = subprocess.Popen(
    new_cmd, stdout=subprocess.PIPE,
    stderr=subprocess.PIPE
    ).communicate()
print(stdout)




你可能感兴趣的:(Python subprocess 模块)