1、将adb logcat内容输出到控制台
import subprocess logcat = subprocess.Popen(["adb", "logcat"], stdout=subprocess.PIPE) try: flag = 0 while not logcat.poll(): line = logcat.stdout.readline() if line: formatted_line = str(line,encoding="utf-8") print(formatted_line) else: break except KeyboardInterrupt: exit(0)
版权声明:本文为weixin_43258703原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。