CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
pathToRegEx.py
Go to the documentation of this file.
1 # To change this template, choose Tools | Templates
2 # and open the template in the editor.
3 
4 __author__="Aurelija"
5 __date__ ="$2010-08-25 11.18.53$"
6 
7 def pathsToRegEx(Paths):
8  paths = []
9  for path in Paths:
10  path = pathToRegEx(path)
11  paths.append(path)
12  return paths
13 
14 def pathToRegEx(path):
15  path = path.replace("\\", "\\\\")
16  path = "\A%s$" %path
17  path = path.replace(".", "\.")
18  path = path.replace("*",".*")
19  return path
def pathToRegEx
Definition: pathToRegEx.py:14
def pathsToRegEx
Definition: pathToRegEx.py:7