#encoding:utf-8import os,time#=======================查找手机设备序列号=============a='adb devices'b=os.popen(a).readlines()#print(b)l=[]for sn in b: if 'device' in sn and 'List' not in sn: a=sn.split('\t')[0] l.append(a)print(l) #手机序列号列表#====================
print 'save to ',savedir+os.sep+d["FILE_NAME"] ff = open(savedir+os.sep+d["FILE_NAME"],"wb") ff.write(f.read()) ff.close() #convert radar data with yang method
(1) os.system # 仅仅在一个子终端运行系统命令,而不能获取命令执行后的返回信息 system(command) -> exit_statusExecute the command (a string) in a subshell. # 如果再命令行下执行,结果直接打印出来 >>> os.system('ls') .CHM bash document media py-django video .wmv books downloads Pictures python a