def filelines(source_file):
 source_file.seek(0, 2)
 while True:
  line = source_file.readline()
  if (not line):
   sleep(0.1)
   continue
  (yield line)

def filelines ( source_file ) : source_file . seek ( 0 , 2 ) while True : line = source_file . readline ( ) if ( not line ) : sleep ( 0.1 ) continue ( yield line )
a generator that returns lines of the file .