title: python os.path.getmtime() time not changing
body: <p>I have a quick issue with python's <code>os.path.getmtime()</code> function. I have observed some weird behavior. I am working on a web app that checks periodically to see if a certain file has been modified and decides whether or not to refresh based on that. </p>
  
  <p>In my local python command line, when I change the file and call <code>os.path.getmtime(file_name)</code> the return value from <code>mtime</code> has changed to reflect the change in the file.</p>
  
  <p>However, when I call <code>os.path.getmtime()</code> in my web app the return value before and after the change is the same. I did some research online and found some stuff to suggest that the os module needs to be reloaded for the change to the file to be registered. So, in my web app I reloaded the <code>os</code> module, but <code>mtime</code> still does not reflect changes to the file. Has anyone else encountered this problem before or know a solution? I have included a code snippet below from the webapp:</p>
  
  <pre><code>import os
  
  def function_name():
      reload(os)
      file_path = '/dir/lib/some_file.js'
  
      try:
          mtime = os.path.getmtime(file_path)
      except os.error:
          pass
  
      return mtime
  </code></pre>