我處理一個TS文件,以下是ffprobe輸出: ffprobe version N-45589-gb6a0b8b- http://johnvansickle.com/ffmpeg/ Copyright (c) 2007-2014 the FFmpeg developers
built on Aug 28 2014 02:30:32 with gcc 4.8 (Debian 4.8.3-9
據David Beazley's talk on generators,下面的代碼應該複製的UNIX tail -f命令: import time
def follow(thefile):
thefile.seek(0,2)
while True:
line = thefile.readline()
if not line:
time.s