Run bash scripts in parallel from python script
<p>I'm facing a problem in python:</p>

<p>My script, at a certain point, has to run some test script written in bash, and I have to do it in parallel, and wait until they end.
I've already tried :</p>

<pre><code>os.system("./script.sh &amp;")
</code></pre>

<p>inside a for loop but it did not worked.</p>

<p>Any suggest? </p>

<p>Thank you!</p>

<p><strong>edit</strong></p>

<p>I have nt correctly explained my situation:
My phyton script resides in the home dir;
my sh scripts resides in other dirs, for instance /tests/folder1 and /tests/folder2;</p>

<p>Trying to use os.system implies the usage of os.chdir prior to call os.system (to avoid troubles on "no such files or directory", my .sh scripts contains some relative references), and also this method is blocking my terminal output.</p>

<p>Trying to use Popen and passing all the path fro home folder to my .sh lead to launch zombie processes without any responses or other.</p>

<p>Hope to find a solution,</p>

<p>Thank you guys!</p>