title: python: read file continuously, even after it has been logrotated
body: <p>I have a simple python script, where I read logfile continuosly (same as <code>tail -f</code>)</p>
  
  <pre><code>while True:
      line = f.readline()
      if line:
          print line,
      else:
          time.sleep(0.1)
  </code></pre>
  
  <p>How can I make sure that I can still read the logfile, after it has been rotated by logrotate?</p>
  
  <p>i.e. I need to do the same what <code>tail -F</code> would do.</p>
  
  <p>I am using <code>python 2.7</code></p>