# # Copyright, Saul Youssef, November 2004 # from Base import * from Environment import * import os,time class Watch(Environment): type = 'watch' title = 'Watch' action = 'watches over files' def __init__(self,path): self._path = path self._mode = 'time' self._time = None self._children = AND() def equal(self,x): return self._path==x._path and self._mode==x._mode def str(self): return self._path def display(self,indent=0): if self._mode=='': print indent*' '+self.statusStr()+' '+self.str() elif not self.acquired: print indent*' '+self.statusStr()+' '+self.str()+'