python常用函数

命令执行

import subprocess
res=subprocess.Popen('dir',shell=True,stdout= subprocess.PIPE)     #执行命令dir,将结果交给管道
res.stdout.read()            #读取管道内容
原文地址:https://www.cnblogs.com/chrrydot/p/9839430.html