2 # pip3 install watchdog
5 from watchdog.observers import Observer
7 command = 'rsync --prune-empty-dirs --include="*/" --include="*.py" --exclude="*" --recursive --whole-file --verbose --progress ./ /media/cefn/CIRCUITPY'
12 subprocess.run(command, shell=True)
15 class ChangeEventHandler:
16 def dispatch(self, event):
20 if __name__ == "__main__":
22 observer.schedule(ChangeEventHandler(), ".", recursive=True)
27 except KeyboardInterrupt: