title: How to use fcntl reading status of lock file?
body: <p>I have a simple example:</p>
  
  <pre><code>#!/usr/bin/python
  import time
  import fcntl
  file = open("e", "w")
  fcntl.lockf(file.fileno(),fcntl.LOCK_EX)
  file.write("foo")
  file.close()
  </code></pre>
  
  <p>How to know locked file or not ? ( Not waiting until file is unlocked )</p>