subprocess.wait() not waiting for Popen process to finish (when using threads)?

后端 未结 4 1100
悲&欢浪女
悲&欢浪女 2020-12-03 14:12

I am experiencing some problems when using subprocess.Popen() to spawn several instances of the same application from my python script using threads to have the

4条回答
  •  余生分开走
    2020-12-03 14:39

    You could also use check_call() instead of Popen. check_call() waits for the command to finish, even when shell=True and then returns the exit code of the job.

提交回复
热议问题