예제 #1
0
파일: pkg.py 프로젝트: p2l1pfp/cmssw
 def tmpl_tags(self):
     "Scan template files and return template tags"
     keys = []
     sdir = '%s/%s' % (self.tdir, self.tmpl)
     for name in os.listdir(sdir):
         if name[-1] == '~':
             continue
         if name == 'CVS':
             continue
         fname = os.path.join(sdir, name)
         with open(fname, 'r') as stream:
             for line in stream.readlines():
                 if line.find('__') != -1:  # possible key
                     keys += [k for k in parse_word(line)]
     return set(keys)
예제 #2
0
파일: pkg.py 프로젝트: Andrej-CMS/cmssw
 def tmpl_tags(self):
     "Scan template files and return template tags"
     keys = []
     sdir = '%s/%s' % (self.tdir, self.tmpl)
     for name in os.listdir(sdir):
         if  name[-1] == '~':
             continue
         if  name == 'CVS':
             continue
         fname = os.path.join(sdir, name)
         with open(fname, 'r') as stream:
             for line in stream.readlines():
                 if  line.find('__') != -1: # possible key
                     keys += [k for k in parse_word(line)]
     return set(keys)