QT QFileSystemWatcher <p>It seems simple but it doesn't work. I have usbautomount installed.</p> <pre><code>#Watch the media directory and connect to enable save csv pb self.usb_watcher = QFileSystemWatcher() self.usb_watcher.addPaths(["/media/usb0"]) self.usb_watcher.directoryChanged.connect(self.enable_save_csv_pb) self.usb_watcher.fileChanged.connect(self.enable_save_csv_pb) </code></pre> <p>I think it has to do with addpath. If I don't put in the square brackets I get this error message:</p> <pre><code>QFileSystemWatcher: failed to add paths: m, e, d, i, a, /, u, s, b, 0 </code></pre> <p>But I've seen examples without the square brackets.</p>