Hi Vimal,<br> The pytailer is really cool stuff, i will try this.<br> Actually i got another option also, just look at this <br> <a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/120686">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/120686</a><br>
This is also seems be to fine, let me check both to get a best one. Thanks for your information.<br><br>thanks<br>Arivoli<br><br><br><div class="gmail_quote">On Fri, Apr 4, 2008 at 1:58 PM, Vimal Menon <<a href="mailto:vimalmenon@yahoo.com">vimalmenon@yahoo.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 10pt;"><div></div>
<div>Hi Arivoli,</div>
<div> </div>
<div>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> .. </div>
<div>(or do a seek and read) </div>
<div>or u can try this <a href="http://code.google.com/p/pytailer/" target="_blank">http://code.google.com/p/pytailer/</a></div>
<div> </div>
<div>Regards,</div>
<div>Vimal</div><div><div></div><div class="Wj3C7c">
<div> <br><br></div>
<div style="font-size: 10pt; font-family: times new roman,new york,times,serif;">
<div style="font-size: 12pt; font-family: times new roman,new york,times,serif;">----- Original Message ----<br>From: Arivoli S <<a href="mailto:arivoli@gmail.com" target="_blank">arivoli@gmail.com</a>><br>To: <a href="mailto:bangpypers@python.org" target="_blank">bangpypers@python.org</a><br>
Sent: Friday, April 4, 2008 11:29:40 PM<br>Subject: [BangPypers] How to read a file from bottom<br><br>Hi everybody,<br> 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.<br>
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?<br clear="all"><br>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?<br>
<br>thanks<br>Arivoli</div><br></div></div></div></div><br>
<hr size="1">You rock. That's why Blockbuster's offering you <a href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com" target="_blank">one month of Blockbuster Total Access</a>, No Cost.</div>
<br>_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>thanks<br>Arivoli