Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python how to force subprocess.call to not wait for the called command to complete

Im using subprocess.call to execute a bat file. subprocess.call is waiting for the bat file to complete before it continues. I want it to start the bat then continue on. Looking at the documents for subprocess it didnt look like it had an option to not wait for the command to complete.

Is there a way to do this or another option besides subprocess.call?

like image 814
ccwhite1 Avatar asked Jan 20 '23 00:01

ccwhite1


1 Answers

subprocess.Popen is what you are looking for!

like image 133
Sebastian Blask Avatar answered Feb 08 '23 14:02

Sebastian Blask