Watching a file another app is writing

Vishal Bhargava vishal at veriwave.com
Mon Mar 12 19:31:53 CET 2007


What kind of file is it? CSV?

-----Original Message-----
From: python-list-bounces+vishal=veriwave.com at python.org
[mailto:python-list-bounces+vishal=veriwave.com at python.org] On Behalf Of
Jeremy Sanders
Sent: Monday, March 12, 2007 11:26 AM
To: python-list at python.org
Subject: Re: Watching a file another app is writing

Gordon Airporte wrote:

> I'm trying to find a way to take a file that another program has opened
> and writes to periodically, open it simultaneously in Python, and
> automatically update some of my objects in Python when the file is
> written to.
> I can open the file and manually readlines() from it to keep up to date,
> it's the automatic part I'm having trouble with. This is on Windows.

It occurs to me under Unix you could perhaps get your first program to write
to a "named pipe", which you 2nd program could read from. See

http://en.wikipedia.org/wiki/Named_pipe

Jeremy

-- 
Jeremy Sanders
http://www.jeremysanders.net/
-- 
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list