On Tue, Mar 08, 2005 at 08:43:04AM -0600, Greg Lindstrom wrote: > I am writing an application where I need to recognize when a file > arrives in a given directory. Files may arrive at any time during the > course of the day. Do I set up a cron job to poll the directory every > few minutes? Write a daemon to monitor the directory? Or is there some > other more common/accepted way to perform this task? I'm using Python > 2.3 on Linux.
you could use dnotify; unfortunately although the fcntl wrapper in python would suffice, there is AFAIK no way to do sigaction. Fortunately there is a dnotify program which is easy enough to use, both from python or directly. -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: <Knghtbrd> 2fort5 sucks enough to have its own gravity ...
signature.asc
Description: Digital signature
-- http://mail.python.org/mailman/listinfo/python-list