[Twisted-Python] watch a directory (Win32)

Henning.Ramm at mediapro-gmbh.de Henning.Ramm at mediapro-gmbh.de
Tue Mar 8 05:27:35 EST 2005

Hello twisted folks!

Last week I found this great framework that seems to do most of what I need. But it's a bit hard to get into, as you know...

I'm on WinXP with Python 2.3. I need to watch a directory for new files and found this recipe using Win32 events:

I'd like to use a twisted reactor instead of that while loop, but don't understand how to handle those Win32 notifies using deferreds.

Or perhaps there is a better twisted solution, that I didn't find in the docs?

I'd prefer a portable way (my script could also run on AIX or MacOS X), but as far as I found, it's heavily system dependent (Win32: win32file.FindFirstChangeNotification, BSD/OSX: kqueue?, Linux: dnotify?)

Best regards,
Henning Hraban Ramm
Südkurier Medienhaus / MediaPro
Support/Admin/Development Dept.

More information about the Twisted-Python mailing list