title: Python : Check file is locked
body: <p>My goal is to know if a file is locked by another process or not, even if I don't have access to that file! </p>
  
  <p>So to be more clear, let's say I'm opening the file using python's built-in <code>open()</code> with <code>'wb'</code> switch (for writing). <code>open()</code> will throw <code>IOError</code> with <code>errno 13 (EACCES)</code> if:</p>
  
  <ol>
  <li>the user does not have permission to the file or </li>
  <li>the file is locked by another process</li>
  </ol>
  
  <p>How can I detect case (2) here? </p>
  
  <p>(My target platform is Windows)</p>