skip to navigation
skip to content

tacit 0.3

It provides an useful function which lets you read lines from the end.

It provides an useful function, tac, which lets you read lines in a file from the end. It works like the tac command in the shell.

It reads file into a fixed buffer and yields lines orderly, so it is comportable to use on big file. (ex. large log)

Installation

You can install it via PyPI,

sudo pip install tacit

or download it manually.

An Example

The content of file:

The first line.
The second line.
The last line.

The code:

for line in open(path):
    print line,
print

from tacit import tac

for line in tac(path):
    print line,

The output:

The first line.
The second line.
The last line.

The last line.
The second line.
The first line.
 
File Type Py Version Uploaded on Size
tacit-0.3.tar.gz (md5) Source 2013-05-23 7KB