2014-05-19 40 views
1

所以我使用「子流程」中的「調用」。我的問題是,當我這樣做時,cmd會彈出一會兒,然後做我告訴它做的事情並關閉。Python子流程在後臺

我甚至不想在那個時刻看到cmd。我如何才能在沒有看到任何東西的情況下在後臺運行。

我已經試過:

call(["..."]) 

subprocess.check_output(["...","..."] 

感謝

+0

[如何在後臺python中運行子進程](http://stackoverflow.com/questions/20292096/how-to-run-a-subprocess-in-the-background-python) – Midnighter

+0

@ Midnighter,你引用的帖子使用「process.wait()」。答案是從代碼中刪除「process.wait()」。我不明白這與此有關。 – Overtim3

+0

他使用'subprocess.Popen',你也應該這樣做。 – Midnighter

回答