title: Python program stops after executing subprocess.Popen once
body: <p>I am trying to execute a command line program multiple times using a loop in python.Naturally I used subprocess module for this task.But on executing the python script the command line program runs once and then stops.Neither does it run again,nor does it return to the python script.Below is the loop I wrote.'commandline' is the command I am running along with its arguments</p>
  
  <pre><code>for i in range(len(final)):
      ss=str(final[i][0])
      endpos=str(final[i][1])
      op='/home/nishant/op'+str(i)
      commandline='/home/nishant/project/LOOV/build/./LOOV -v vid -output op -ss ss -endpos endpos -lang eng -print_text'
      subprocess.Popen(commandline,shell=True).communicate()
  </code></pre>