def monitor_file(self, filename): """ Enable file monitoring """ try: # TODO : Try to remove qt dependencie here from openalea.vpltk.qt import QtCore self.watch = QtCore.QFileSystemWatcher() QtCore.QCoreApplication.instance().connect( self.watch, QtCore.SIGNAL("fileChanged(const QString&)"), self.changed) self.watch.addPath(filename) except: print "File monitoring is not available"