Can subprocess.call be invoked without waiting for process to finish?

前端 未结 1 609
鱼传尺愫
鱼传尺愫 2020-12-09 14:34

I\'m currently using subprocess.call() to invoke another program, but it blocks the executing thread until that program finishes. Is there a way to simply launch that progra

1条回答
  •  借酒劲吻你
    2020-12-09 15:25

    Use subprocess.Popen instead of subprocess.call:

    process = subprocess.Popen(['foo', '-b', 'bar'])
    

    0 讨论(0)
提交回复
热议问题