[python-win32] Is there an interface to "ReadDirectoryChanges W"

Tim Golden tim.golden@viacom-outdoor.co.uk
Fri, 17 Jan 2003 15:40:13 -0000


Yes, no matter how much optimization you piled into the python bits (using
dictionaries or bisect lookups or what-have-you) the limiting factor is the
os.listdir: depending on your OS setup that can take quite some time to come
back. Good luck, and let me know how you get on. I apologise (on their
behalf) for the fact that the ActiveState web form for comments completely
mangled my helpful comments; the only thing I can now remember of any use
was the fact that the FindNextChangeNotification call need only be called
when a change is notified, _not_ at every timeout, ie the current
notification is active until it finds something.

Another possibility which I haven't investigated (because, frankly, I don't
need to at the moment) is to use the recently available ctypes module from
Thomas Heller (http://starship.python.net/crew/theller/ctypes.html). As I
say, I've not tried it, but the noise on c.l.py seems favourable. The idea
would be that with this in your toolbelt you could make up for the lack of
any particular function in the win32all libraries.

TJG

-----Original Message-----
From: Jos Yule [mailto:jos@trapeze.com]
Sent: 17 January 2003 15:05
To: Tim Golden
Cc: python-win32@python.org
Subject: Re: [python-win32] Is there an interface to
"ReadDirectoryChangesW"


Huh - that's pretty cool, thanks for the link!

I'm going to try this out, my worry is that i have _a lot_ of files to 
keep track of, and i'm not sure how much this would slow it all down... 
anyway, i will see how it works out!

Thanks again,
jos


Tim Golden wrote:
> Is this any help? I know it doesn't directly answer your question, but
maybe
> it does the same sort of thing.
> 
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/156178
> 
> TJG
> 

-- 


Jos Yule
EWACT (employee without a cool title)

Trapeze
2 Berkeley St. Suite 305
Toronto, On, CANADA
M5A 4J5

t: 416 601 1999 x227
f: 416 601 1997
e: jos@trapeze.com
w: http://www.trapeze.com


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. 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 Internet. 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
________________________________________________________________________