Windows XP 系统总命令集合 winver---------检查Windows版本 wmimgmt.msc----打开windows管理体系结构(WMI) wupdmgr--------windows更新程序 wscr ipt--------windows脚本宿主设置 write----------写字板 winmsd---------系统信息
第一种情况
os.system('ps aux')
执行系统命令,没有返回值
第二种情况
result = os.popen('ps aux')
res = result.read()
for line in res.splitlines():
print line
执行系统命令,可以获取执行系统命令的结果
p = subprocess.Popen('ps aux',shell=True,stdout=subprocess.PIPE)
out,err =