Newbie-Question: Oberserving an directory

Sean 'Shaleh' Perry shalehperry at
Fri Jun 21 12:32:06 EDT 2002

On 21-Jun-2002 Marcus Klein wrote:
> Hi there,
> I want to observe an directory to check if a new file has been put in, if 
> that happens I want to start an event.
> Does anyone have a good idea how to start, I've tried it with signal, but 
> either I am too stupid or it is the complete wrong way :-/

under UNIX the only way to accomplish this is to periodically poll the
directory with stat.  There is no signal you can watch for.  I can not speak
for either Mac or Windows.

More information about the Python-list mailing list