title: os.remove - [WinError 32] The process cannot access the file because it is being used by another process
body: <p>If I run this as a separate module, it works fine but when I call this as a method in another py file, it stops after 2nd loop and throws the below error:</p>
  <pre class="lang-py prettyprint-override"><code>for rownum in range(1, ws_read_execution_report_max_rows):
      shutil.copy(pdf_file_path, pdf_archive_path)
      if os.path.isfile(pdf_file_path):
          os.remove(pdf_file_path)
  </code></pre>
  <p>Throws exception:</p>
  <pre><code>[WinError 32] The process cannot access the file because it is being used by another process
  </code></pre>