小编pra*_*pra的帖子

如何实现py -onic等价的tail -F?

对于某些关键字的出现,观察不断增长的文件尾端的pythonic方法是什么?

在shell中我可能会说:

tail -f "$file" | grep "$string" | while read hit; do
    #stuff
done
Run Code Online (Sandbox Code Playgroud)

python file tail

25
推荐指数
2
解决办法
2万
查看次数

标签 统计

file ×1

python ×1

tail ×1