title: Python popen command. Wait until the command is finished
body: <p>I have a script where I launch with popen a shell command.
  The problem is that the script doesn't wait until that popen command is finished and go continues right away.</p>
  
  <pre><code>om_points = os.popen(command, "w")
  .....
  </code></pre>
  
  <p>How can I tell to my Python script to wait until the shell command has finished?</p>