[python] adb logcat realtime processing -- subprocess
作者:互联网
CMD_logcat_clean = 'adb logcat -c'
CMD = '''adb shell "logcat | grep abc"'''
subprocess.Popen(args = CMD_logcat_clean, stdin = None, stdout= None, stderr= None, shell = False)
p_obj = subprocess.Popen(args = CMD, stdin = None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell = False)
with p_obj:
for line in p_obj.stdout:
标签:stdout,None,shell,logcat,realtime,python,CMD,subprocess 来源: https://www.cnblogs.com/galaxy-tek/p/15037975.html