How to check in python that a file in a folder has changed?

Novellizator picture Novellizator · Sep 25, 2012 · Viewed 27.9k times · Source

I need to know in python whenever a new file was added/removed/modified in a particular directory Is there a way for that? I'm looking for an "inofity"-like function (from POSIX).

Thanks

Answer

serfer2 picture serfer2 · Aug 11, 2016

You can use inotify for python, which is NOT the same as PyInotify (older).