Watching a file another app is writing
Roel Schroeven
rschroev_nospam_ml at fastmail.fm
Mon Mar 12 05:04:04 EDT 2007
Gordon Airporte schreef:
> Nick Vatamaniuc wrote:
> > You might need to look at pywin32 for Windows specific ways to listen
>> to "file changed" event.
>>
>> On Unix a quick shortcut would be to simply read the output of 'tail -
>> f <file>' command...
>
> Ah, I forgot I have Cygwin installed, so I do have tail. Unfortunately
> Windows will not let most programs save to the file while tail is
> watching it, and when I force it with vim :w! the output from tail -f
> does not update. Maybe I'm using it wrong.
Have you tried with tail -F instead of tail -f? With a big F it uses the
name of the file instead of the file descriptor, and it keeps trying to
open the file. I'm not sure if it will work, but it's worth a shot.
--
If I have been able to see further, it was only because I stood
on the shoulders of giants. -- Isaac Newton
Roel Schroeven
More information about the Python-list
mailing list