痴情快婿国语,米易租房,论剑太行
1 # -*- coding:utf-8 -*- 2 import os 3 import time 4 from common import common 5 comm = common() 6 7 cmd = r'adb logcat -v time -b main -b radio -b system >' 8 for i in range(3): 9 fn = r'../run_log/logcat' + str(i) + '.log' 10 os.popen(cmd+fn) 11 pid = comm.getapppid('logcat') 12 while true: 13 fs = round(os.path.getsize(fn)/float(1024*1024),2) 14 time.sleep(1) 15 print ("当前文件的大小为:%s mb" %fs) 16 if fs >= 1: 17 kill_cmd = 'adb shell kill ' + pid 18 os.popen(kill_cmd) 19 break 20 print ("当前的日志文件为:%s" %fn) 21
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Python爬虫:Request Payload和Form Data的简单区别说明
浅谈Python中threading join和setDaemon用法及区别说明
Python3-异步进程回调函数(callback())介绍
python继承threading.Thread实现有返回值的子类实例
Python中使用threading.Event协调线程的运行详解
网友评论