this will work, thanks !

shawn

On 1/31/07, Volker Helm <[EMAIL PROTECTED]> wrote:

Hi,

define the amount of lines your will show. i.e. 25 lines.
First I'd open the log file with mode 'r+'.
Second, loop through the file an get every line with readline into the
array, but after 25 lines, delete the first line with array.pop(i).
Remember the last position.

Third after the loop ended join the array and put into the textview.
For refresh create a button or use a timer, which start at the end of the
file and loops through till the end again.

Little complicated, but I don't now a function like tail in python.

Bye,

Volker


-------- Original-Nachricht --------
Datum: Wed, 31 Jan 2007 12:38:43 -0600
Von: "shawn bright" <[EMAIL PROTECTED]>
An: pygtk-list <[email protected]>
CC:
Betreff: [pygtk] way to tail a log file to a veiwer

> lo there,
>
> i am looking for an easy way to tail a log file and pipe its output to a
> text view.
>
> any ideas ?
>
> sk

--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to