android - Python - How to hide output after killed specified process -


Now I try to create a Python script to automatically get Android logos from

Below Secureon is my share of code

  logcat_process = subprocess.Popen ('adb logcat -v time & gt; logcat.log', shell = true) time.sleep (5) os.kill   

However, every time after the os.kill process has expired, it is

  "" (  

Does anyone have any idea how to hide this message?

I'm more likely to print the result of the script more clearly ....

You can do something like this:

  logcat_process = subprocess.Popen ('adb logcat -v time & gt; logcat.log', shell = true) time.sleep (5) Save_stdout = Sys.stdout sys.stdout = open (r '/ youlib .... / trash.txt', 'w') os.kill ((logcat_process.pid) +1 signal, SIGKILL) # To retrieve the studio Sys.stdout.close () sys.stdout = save_stdout   

This will divert the feed out to trash.txt on operation .

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -