<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import time <EOL> def tail_f ( fname , block = True , sleep = <NUM_LIT:1> ) : <EOL> """<STR_LIT>""" <EOL> fh = open ( fname , '<STR_LIT:r>' ) <EOL> while <NUM_LIT:1> : <EOL> where = fh . tell ( ) <EOL> line = fh . readline ( ) <EOL> if not line : <EOL> if block : <EOL> time . sleep ( sleep ) <EOL> else : <EOL> yield <EOL> fh . seek ( where ) <EOL> else : <EOL> yield line </s>
