Fork me on GitHub
  1. Filesystem Watch with PyQt4

    I decided to write a generic program that can watch a folder or some files and run a command when changes occur.

    Most of the work is done by PyQt4's QFileSystemWatcher.

    qfsw = QtCore.QFileSystemWatcher()
    qfsw.addPaths([path1, file2 ... ])
    
    QtCore.QObject.connect(qfsw,QtCore.SIGNAL("directoryChanged(QString)"),function)
    QtCore.QObject.connect …
    read more

    There are comments.

« Page 2 / 2

social