[BangPypers] How to read a file from bottom
arivoli at gmail.com
Fri Apr 4 21:13:54 CEST 2008
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/
> ----- 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
> 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?
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the BangPypers