[BangPypers] How to read a file from bottom

Arivoli S arivoli at gmail.com
Fri Apr 4 21:13:54 CEST 2008

Hi Vimal,
   The pytailer is really cool stuff, i will try this.
   Actually i got another option also, just look at this
   This is also seems be to fine, let me check both to get a best one.
Thanks for your information.


On Fri, Apr 4, 2008 at 1:58 PM, Vimal Menon <vimalmenon at yahoo.com> 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 <arivoli at gmail.com>
> To: bangpypers at 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 at python.org
> http://mail.python.org/mailman/listinfo/bangpypers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/bangpypers/attachments/20080404/67803bb8/attachment.htm 

More information about the BangPypers mailing list