00001 # To change this template, choose Tools | Templates 00002 # and open the template in the editor. 00003 00004 __author__="Aurelija" 00005 __date__ ="$2010-08-25 11.18.53$" 00006 00007 def pathsToRegEx(Paths): 00008 paths = [] 00009 for path in Paths: 00010 path = pathToRegEx(path) 00011 paths.append(path) 00012 return paths 00013 00014 def pathToRegEx(path): 00015 path = path.replace("\\", "\\\\") 00016 path = "\A%s$" %path 00017 path = path.replace(".", "\.") 00018 path = path.replace("*",".*") 00019 return path