title: How can I delay execution until after os.system finishes?
body: <p>I am using <code>os.system</code> to copy a file from a system to another. The logic of a very simple program is to execute another set of commands after this file gets copied. </p>
  
  <p>The problem is that <code>os.system</code> does not actually wait for the file to be copied, and gets to executing the next line. This causes issues to the system. I could actually give some wait functions, through <code>time.sleep()</code>, but we have to copy files with sizes ranging from 500 MB to sometimes 20 GB, and the times taken are very different.</p>
  
  <p>What's the solution? I need to somehow tell my program that the files are copied, and then to execute the next line.</p>