Check File Change Every 10 Seconds
Paul Rubin
http
Tue Oct 23 00:54:54 EDT 2007
"Robert Rawlins - Think Blue" <robert.rawlins at thinkbluemedia.co.uk> writes:
> That certainly looks to be the type of thing that I'm looking to
> achieve, however, I forgot to mention I'm running this on a Linux
> platform and not a Win32 one :-( Sorry.
If it's just one file, then yes, stat it in a loop with os.sleep.
If you want to do something fancier like watch the appearance and
disappearance of files in a directory, use the inotify system:
http://pyinotify.sourceforge.net/
More information about the Python-list
mailing list