I have successfully used the python bindings to
in my dbus mainloop to react to changes in a known single file. But I have a case now, where I'm running a dbus mainloop, and need to do work when a directory changes.
I've played around with the command line tool
inotifywait -m directory
, as well as played with some of the examples provided with pyinotify. What's unclear is how I put the two together. Or if I even should. I could
just launch a thread that uses a pipe to run
directly, and then write to a ram file in
which I had established an
to. I'm relatively new to glib/dbus/mainloop, so it's still kind of magic to me.
seems kind of heavy for my purposes, but I'm working from no experience here.
I'm running on Debian Jessie, using python3. I am not looking for anything cross platform.