I am considering to work with python-watchdog
. Is there a way to determine which process (PID) caused a detected event?
Background: I am looking for a way to detect modify events caused by certain editors like vim
, pycharm
or kate
. In a nutshell, those editors do not "modify" the original file when changes are saved. Instead, they create a new one and swap it with the old one - in slightly different various ways. See related issue in python-watchdog
. Instead of re-configuring those editors, I am looking for ways of detecting those sequences of [create/delete/move] events and reliably re-interpreting as "pseudo modify" events of the original file.