def watch(self):

        rev =  self.client.rev().rev

        def watchjob(rev):
            change = None

            while True:
                try:
                    change = self.client.wait("%s/**" % self._folder, rev)
                except Timeout:
                    rev = self.client.rev().rev
                    change = None

                if change:
                    self._handle_change(change)
                    rev = change.rev+1
                #print '.....', rev

        self.watchjob = gevent.spawn(watchjob, rev)
watch the directory path for changes.
dataset/ETHPy150Open progrium/pydoozer/examples/doozerdata.py/DoozerData.watch