I need to write a program which continuously checks a directory for new files and does some processing whenever there a new file is added. Obviously I will probably need to use some threads but is there any convenient way or pointers that anyone can suggest for achieving this in python ? (FOr both linux and windows)
Share
“Busy” polling is a waste of resources. There are a number of different, operating-system dependant APIs that allow this kind of monitoring.
Some of your choices (for Linux that is) include: