subprocessing Popen、run Popen是非阻塞的,run是阻塞的。 import subprocess as sp self.p = sp.Popen(command) # self.p = sp.run(command)