No threads needed
If you don't
In the case of a long running background process, you should return
import time def execute_command(command): process = Popen(command,stdout=PIPE,stder=PIPE) time.sleep(10) process.terminate()The call
communicate
blocks until the process has been finished.If you don't
terminate
the process, then it's running in the background and does not block.In the case of a long running background process, you should return
proc
in your function.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!