8000 GitHub - domysh/python-tail: Unix tail follow implementation in python
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 7, 2024. It is now read-only.
/ python-tail Public archive
forked from kasun/python-tail

Unix tail follow implementation in python

License

Notifications You must be signed in to change notification settings

domysh/python-tail

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-tail - Unix tail follow implementation in Python

Installation

python setup.py install

Basic Usage

import tail

# Create a tail instance
t = tail.Tail('file-to-be-followed')

# Register a callback function to be called when a new line is found in the followed file. 
# If no callback function is registerd, new lines would be printed to standard out.
t.register_callback(callback_function)

# Follow the file with 5 seconds as sleep time between iterations. 
# If sleep time is not provided 1 second is used as the default time.
t.follow(s=5)

About

Unix tail follow implementation in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0