Category : watchdog

The python code below is my first attempt for notification when a file is modified, however nothing happens when the file is changed. What have I missed here? #!/usr/bin/python3 import time from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class MyHandler(FileSystemEventHandler): def on_modified(self, event): print(‘file changed’) if __name__ == "__main__": event_handler = MyHandler() observer = ..

Read more

What I am trying to do : Whenever a new file is created in the monitored folder(using Watchdog), change the QLabel text. Problem : QLabel Text wont update when new file create with the code below. (But successfully debug prints to console) class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): def __init__(self): super(MainWindow, self).__init__() self.setupUi(self) #This starts the watchdog when ..

Read more