Hi Vimal, The pytailer is really cool stuff, i will try this. Actually i got another option also, just look at this http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/120686 This is also seems be to fine, let me check both to get a best one. Thanks for your information.
thanks Arivoli On Fri, Apr 4, 2008 at 1:58 PM, Vimal Menon <[EMAIL PROTECTED]> wrote: > Hi Arivoli, > > Theres a dirty trick ;) (by running a command).. If u r on a linux > machine u can use the tail command .. tail -100 <filename> would give u the > last 100 lines of <filename> .. > (or do a seek and read) > or u can try this http://code.google.com/p/pytailer/ > > Regards, > Vimal > > > ----- Original Message ---- > From: Arivoli S <[EMAIL PROTECTED]> > To: bangpypers@python.org > Sent: Friday, April 4, 2008 11:29:40 PM > Subject: [BangPypers] How to read a file from bottom > > Hi everybody, > i have a log file which will grow everyday, so the size will be nearly > 500MB. i am keep on inserting a line one by one in the file. > so the latest one will be in the bottom. I need to get latest 100 > lines(lines from bottom). Any idea how to read lines from bottom in a text > file? > > I tried storing into a list line by line, and iterating from bottom , but > it seems to be slow. Is there any better way to do this? > > thanks > Arivoli > > > ------------------------------ > You rock. That's why Blockbuster's offering you one month of Blockbuster > Total > Access<http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com>, > No Cost. > > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- thanks Arivoli
_______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers