title: Read new line with pynotify
body: <p>I'm trying to display a new line that was added to the file.
  So imagine that I have a <code>sample_file.txt</code> :</p>
  
  <pre><code> 1. line 1
   2. line 2
   3. line 3
  </code></pre>
  
  <p>I want to check if this file got a new line, and than display that line (without printing all the file again)</p>
  
  <pre><code>#!/usr/bin/python
  
  import os
  import pyinotify
  from datetime import datetime
  import time
  
  PATH = os.path.join(os.path.expanduser('~/'), 'sample_file.txt')
  
  m = pyinotify.WatchManager()
  m.add_watch(PATH, pyinotify.ALL_EVENTS, rec=True)
  notifier = pyinotify.Notifier(m, pyinotify.ProcessEvent(), 0,  0, 100)
  
  f = open(PATH)
  for line in f.readlines():
      print line
  
  while True:
      time.sleep(5)
      try:
          if notifier.check_events():
              # RIGHT HERE:
              # HOW TO DO SOMETHING LIKE
              # f.last() ???
              print f.next()
          else:
              print 'waiting for a line....'
      except KeyboardInterrupt:
          notifier.stop()
          break
  </code></pre>
  
  <p>What I was thinking is to read all the lines somewhere before while loop, and than print the next line, but something wrong in my code, and it checks for <code>f.next()</code> right after it comes to the loop.</p>