예제 #1
0
파일: autoreload.py 프로젝트: rsms/smisk
 def __init__(self, frequency=1, match=None):
   '''
   :param frequency: How often to perform file modification checks
   :type  frequency: int
   :param match:     Only check modules matching this regular expression.
                     Matches anything if None.
   :type  match:     re.RegExp
   '''
   self.config_files = set()
   self.mtimes = {}
   self.log = None # in runner thread -- should not be set manually
   self.match = match
   Monitor.__init__(self, self.run, self.setup, frequency)
예제 #2
0
파일: autoreload.py 프로젝트: rsms/smisk
 def start(self):
   '''Start our own perpetual timer thread for self.run.'''
   if self.thread is None:
     self.mtimes = {}
   self._update_config_files_list()
   Monitor.start(self)