title: Waiting until a os.system command finishes
body: <p>I have encountered a problem with my python script. I am using python 3. I am using the os.system function to open an app on my mac. What I would like to do is have the computer print "done" when it has finished opening. The problem is the script prints "done" before the app is even done loading. The app starts launching but the script prints "done" before the app is completely done launching. This is my script:</p>
  
  <pre><code>import os
  
  os.system('open "/Applications/Pages.app"')
  print("done.")
  </code></pre>
  
  <p>Plz help</p>
  
  <p>Thanks in advance</p>