'''
   Modified file class; its next method uses readline() instead
   of the readahead buffer in file.next(), which doesn't work in
   a "tail -f " mode.

'''

class linefile(file):
   def next(self):
      s = self.readline()
      if s:
         return s
      raise StopIteration
