监听文件输入

ef tail(filename):
f = open(filename,encoding='utf-8')
while True:
line = f.readline()
if line.strip():
yield line.strip()

g = tail('file')
for i in g:
if 'python' in i:
print('***',i)
posted @ 2019-05-24 16:40  18软件工程五班陈星星  阅读(109)  评论(0编辑  收藏  举报