PDA

View Full Version : Python watch dir for changes



prem1er
May 13th, 2009, 11:56 PM
I want to watch a Unix directory for new files and when the a new file is created/added I want to run some processes on it. One extra requirement is that I need to make sure the file is finished being written to before it gets picked up. Is there any way to do this or at least what should I be looking for on google? Thanks.

kpkeerthi
May 14th, 2009, 06:51 AM
http://pyinotify.sourceforge.net/

prem1er
May 18th, 2009, 02:40 PM
Perfect. Just what I needed. Thank you.