I've been Googling for an answer to this question but nowhere seems to have one. Can anyone tell me if the subprocess
module does its calls in parallel? The Python docs suggest it can be used to spawn new processes, but it doesn't mention if they are in parallel or not. If they can be done in parallel could you kindly show me an example or link me to one?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
It depends on how you use
subprocess
:will block until
some-program
completes.will run
some-program
in a separate process, in parallel with the remainder of your script.Note that the first is simply a convenient wrapper that is equivalent to
output = subprocess.check_output("some-program")
is basically the same as