blocking file.readlines() needed
__peter__ at web.de
Fri Aug 13 19:55:19 CEST 2004
Uwe Mayer wrote:
> I am looking for a way to make the call to a file objects readline()
> method blocking when there is no more data, until data is appended to the
> file, similar to the way
> $ tail -F <system log file>
> However, file.readlines() aborts and returns an empty list.
> Any ideas?
The naive way to do it:
line = f.readline()
if not line:
More information about the Python-list