CMS 3D CMS Logo

Public Member Functions | Public Attributes

lumiPlot::RegexValidator Class Reference

List of all members.

Public Member Functions

def __call__
def __init__

Public Attributes

 pattern
 statement

Detailed Description

Definition at line 8 of file lumiPlot.py.


Constructor & Destructor Documentation

def lumiPlot::RegexValidator::__init__ (   self,
  pattern,
  statement = None 
)

Definition at line 9 of file lumiPlot.py.

00010                                                :
00011         self.pattern = re.compile(pattern)
00012         self.statement = statement
00013         if not self.statement:
00014             self.statement = "must match pattern %s" % self.pattern


Member Function Documentation

def lumiPlot::RegexValidator::__call__ (   self,
  string 
)

Definition at line 15 of file lumiPlot.py.

00016                               :
00017         match = self.pattern.search(string)
00018         if not match:
00019             raise ValueError(self.statement)
        return string

Member Data Documentation

Definition at line 9 of file lumiPlot.py.

Definition at line 9 of file lumiPlot.py.