python 杀死adb logcat

想用python读取adb logcat日志后,然后再次kill这个进程,试过了很多方法都无法解决,最后的解决方案如下:

 handle = subprocess.Popen("adb -d  logcat >" +log, shell=True)
  time.sleep(1)
 subprocess.Popen("taskkill /F /T /PID " + str(handle.pid) , shell=True)

你可能感兴趣的:(python 杀死adb logcat)