[python-win32] detect file modification event
Tim Golden
tim.golden at viacom-outdoor.co.uk
Fri Oct 21 09:48:36 CEST 2005
[Jim McCoy]
> The only warning I would add here is that you should be aware of the
fact that your watcher
> thread will block waiting for a change to occur in the directory; you
cannot cancel the
> blocked ReadDirectoryChangesW call using the standard pywin32
bindings.
If it causes a problem it might be worth considering one of the other
techniques, eg
http://tgolden.sc.sabren.com/python/win32_how_do_i/watch_directory_for_c
hanges.html#use_findfirstchange
which uses the standard WaitForSingleObject approach which admits of a
timeout.
> We have put together some patches for ReadDirectoryChangesW in
pywin32-204
> that enable you to do this check using an io completion event so that
you do
> not end up blocking on the directory you are watching. I have been a
lazy
> bum and left these things sitting in a directory waiting to send off
to Mark...
> I guess I should pass them along.
Please do. I, at least, would love to grapple with it.
Jim
_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. For more information on a proactive anti-virus
service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-win32
mailing list