Hi,
If you want an easy way of iterating over stdin, you may be interested
in using this module:
http://www.python.org/dev/doc/devel/lib/module-fileinput.html
I've used it with some of my scripts to do something similar.
It will not work for a growing file though...
Otherwise, you can always tr
> I have a closed-source application which creates log files. I'd like
to
> capture this logfile data as it is crated, and do clever things with
it!
>
> Is this possible? I guess it must be, because there are "tail" type
> utilities for Windows...
Depends on whether the output goes to stdout or st
You could have something along the lines of -
import os.path
import time
curTime = os.path.getmtime('log.txt') #Or whatever it's called.
while 1: #or some other loop
time.sleep(10) #Check logfile every ten seconds.
if os.path.getmtime('log.txt') != curTime:
curTime = os.path.get