Watch log

Salvatore Di Fazio salvatore.difazio at gmail.com
Tue Jan 16 08:58:46 EST 2007


Thinker ha scritto:

> What you want is something like 'tail -f' in linux.
> If you look into it's source code, you will find it check file periodically.
> When a read() reach the end of the file, read() will return a empty string.
> You can try to read data from the file periodically after a EOF.
> I think it is what you want.

So every 2 sec:
- open the file
- read the file from the oldPosition to the EOF
- save the last position in file
- first point

mmm ok




More information about the Python-list mailing list