Michele Simionato ha scritto:
> You may begin from this:
Tnx Michele
--
http://mail.python.org/mailman/listinfo/python-list
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.
Salvatore Di Fazio wrote:
> Hi guys,
> I've an application that writes a log file.
> I need to write an application with python that will read this file.
You may begin from this:
$ cat showlog.py
import sys
from ScrolledText import ScrolledText
interval =50 # ms
def displayfile(f, textwidget):
Salvatore Di Fazio wrote:
> Bjoern Schliessmann ha scritto:
>
>
>> Why not read the file continuously and only do something if a new
>> line is complete (i. e. a newline char is detected)?
>>
>
> How can I read the file continuously?
>
>
What you want is something like 'tail -f' in linu
Salvatore Di Fazio wrote:
> Hi guys,
> I've an application that writes a log file.
> I need to write an application with python that will read this file.
>
> I would like wait until a new line will be write in the file.
>
> Something like the "watch cat Log" command on Linux os.
>
> How can I ch
Bjoern Schliessmann ha scritto:
> Why not read the file continuously and only do something if a new
> line is complete (i. e. a newline char is detected)?
How can I read the file continuously?
--
http://mail.python.org/mailman/listinfo/python-list
Salvatore Di Fazio wrote:
> I would like wait until a new line will be write in the file.
>
> Something like the "watch cat Log" command on Linux os.
Why not read the file continuously and only do something if a new
line is complete (i. e. a newline char is detected)?
> How can I check the eof
Hi guys,
I've an application that writes a log file.
I need to write an application with python that will read this file.
I would like wait until a new line will be write in the file.
Something like the "watch cat Log" command on Linux os.
How can I check the eof and restart the reading?
--
ht