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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -