dbrtools/dbr/dbrutils.py
changeset 211 fc3107523c38
parent 208 01c2b1268053
child 284 0792141abac7
equal deleted inserted replaced
209:97a2261627a2 211:fc3107523c38
   264   f = open(filename, 'r')
   264   f = open(filename, 'r')
   265 
   265 
   266   fixpath = re.compile('\\\\')
   266   fixpath = re.compile('\\\\')
   267   leadingslash = re.compile('^%s' % fixpath.sub('/',epocroot()))
   267   leadingslash = re.compile('^%s' % fixpath.sub('/',epocroot()))
   268   newline = re.compile('\n')
   268   newline = re.compile('\n')
       
   269   epoc32 = re.compile('^epoc32');
       
   270   trailingtab = re.compile('\t\d+') #normally in rombuild files...
   269   for line in f:
   271   for line in f:
   270     line = newline.sub('',line)
   272     line = newline.sub('',line)
   271     name = string.lower(leadingslash.sub('',fixpath.sub('/',line)))  
   273     name = string.lower(leadingslash.sub('',fixpath.sub('/',line)))
   272     files.add(name)
   274     if(epoc32.search(name)):
       
   275       name = trailingtab.sub('',name) 
       
   276       files.add(name)
   273   f.close()  
   277   f.close()  
   274   return files
   278   return files
   275 
   279