#!/usr/bin/python
# coding: utf-8
from subprocess import Popen, PIPE
p1 = Popen("tail -f /var/log/1.txt", shell=True, stdout=PIPE)
while True:
content = p1.stdout.readline()
if 'end' in content:
print 'end detected'
break
else:
print content
用户登录
还没有账号?立即注册
用户注册
投稿取消
| 文章分类: |
|
还能输入300字
上传中....
用户25555211