Reading a file that is changing and getting the new lines
half.italian at gmail.com
Wed Dec 2 02:31:57 CET 2009
On Dec 1, 3:09 pm, Ouray Viney <ovi... at gmail.com> wrote:
> I want to read a ASCII text file that can have data appended to it.
> Example scenario: As the python script is running a user/application
> adds new entries to the end of the test case file, example, adds the
> following to the file.
> What is the best way to handle this type of scenario using python?
There was a thread regarding 'imitating "tail -f"' recently that you
might find useful.
The best approach IMO is this one: http://www.dabeaz.com/generators/follow.py
More information about the Python-list