[pygtk] way to tail a log file to a veiwer
shawn bright
nephish at gmail.com
Thu Feb 1 05:21:45 WST 2007
this will work, thanks !
shawn
On 1/31/07, Volker Helm <Helm.volker at gmx.de> 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" <nephish at gmail.com>
> An: pygtk-list <pygtk at daa.com.au>
> 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=FCr Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20070131/c78c99e2/at=
tachment-0001.htm
More information about the pygtk
mailing list