Beispiel #1
0
 def _watch_pattern(self, include):
     pattern = u''
     a = []
     for entry in include:
         e = textutil.toRegExpS(entry)
         a.append(e)
     pattern = '|'.join(a)
     return pattern
Beispiel #2
0
 def _watch_pattern(self, include):
     pattern = u''
     a = []
     for entry in include:
         e = textutil.toRegExpS(entry)
         a.append(e)
     pattern = '|'.join(a)
     return pattern
Beispiel #3
0
 def __init__(self, matchlist):
     assert isinstance(matchlist, types.ListType)
     self.matchlist = matchlist   # ["a.b.c.*", "d.e.Foo"]
     elems = []
     for elem in matchlist:
         assert isinstance(elem, types.StringTypes)
         if elem != "":
             regexp = textutil.toRegExpS(elem)
             elems.append(regexp)
     if elems:
         self.__regexp = re.compile("|".join(elems))
     else:
         self.__regexp = re.compile(r".\A")  # match none
 def __init__(self, matchlist):
     assert isinstance(matchlist, types.ListType)
     self.matchlist = matchlist  # ["a.b.c.*", "d.e.Foo"]
     elems = []
     for elem in matchlist:
         assert isinstance(elem, types.StringTypes)
         if elem != "":
             regexp = textutil.toRegExpS(elem)
             elems.append(regexp)
     if elems:
         self.__regexp = re.compile("|".join(elems))
     else:
         self.__regexp = re.compile(r".\A")  # match none
Beispiel #5
0
 def setFilter(self, filterPatternsList=[]):
     if not filterPatternsList:
         self.filter_pattern = ""
         return
     re_patts = [textutil.toRegExpS(x) for x in filterPatternsList]
     self.filter_pattern = re.compile("|".join(re_patts))
Beispiel #6
0
 def setFilter(self, filterPatternsList=[]):
     if not filterPatternsList:
         self.filter_pattern = ""
         return
     re_patts = [textutil.toRegExpS(x) for x in filterPatternsList]
     self.filter_pattern = re.compile("|".join(re_patts))