| Trees | Indices | Help |
|
|---|
|
|
object --+
|
Tail
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Initialize a tail monitor. path: filename to open only_new: By default, the tail monitor will start reading from the beginning of the file when first opened. Set only_new to True to have it skip to the end when it first opens, so that you only get the new additions that arrive after you start monitoring. min_sleep: Shortest interval in seconds to sleep when waiting for more input to arrive. Defaults to 1.0 second. sleep_interval: The tail monitor will dynamically recompute an appropriate sleep interval based on a sliding window of data arrival rate. You can set sleep_interval here to seed it initially if the default of 1.0 second doesn't work for you and you don't want to wait for it to converge. max_sleep: Maximum interval in seconds to sleep when waiting for more input to arrive. Also, if this many seconds have elapsed without getting any new data, the tail monitor will check to see if the log got truncated (rotated) and will quietly reopen itself if this was the case. Defaults to 60.0 seconds.
|
|
|
|
Iterator interface, so you can do:
for line in filetail.Tail('log.txt'):
# do stuff
pass
|
Kick the iterator interface. Used under the covers to support:
for line in filetail.Tail('log.txt'):
# do stuff
pass
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sun Oct 28 06:07:08 2007 | http://epydoc.sourceforge.net |