Watching a file another app is writing

Gordon Airporte JHoover at fbi.gov
Mon Mar 12 20:33:28 CET 2007


Gabriel Genellina wrote:
  > This article explains it in detail:
> http://tgolden.sc.sabren.com/python/win32_how_do_i/watch_directory_for_changes.html 
> 
> BTW, it's the top result on Google for "python notify file change windows"
> 
> --Gabriel Genellina

Ah, excelent. Thank you. I'd started with the pywin32 documentation, 
where I did manage to find FindFirstChangeNotification(). I had to go to 
bed before I could get to Google to figure out how to use it.
Having just tested it, it seems that my problem is now caching. These 
only trigger when the file is written to disk, and for the small amounts 
of data I'm dealing with that's not with every transaction.
This is probably why tail wasn't working for me either, with the added 
complication of it locking the file.



More information about the Python-list mailing list