Package qm :: Package test :: Package classes :: Module file :: Class SubstitutionField
[hide private]
[frames] | no frames]

Class SubstitutionField

source code

   object --+        
            |        
 fields.Field --+    
                |    
fields.TupleField --+
                    |
                   SubstitutionField

A rule for performing a text substitution.

A 'SubstitutionField' consists of a regular expression pattern and a corresponding replacement string. When the substitution is applied to a body of text, all substrings that match the pattern are replaced with the substitution string.

The syntax for the regular expression and the substitution string is that of the standard Python 're' (regular expression) module.

Instance Methods [hide private]
 
__init__(self, name, **properties)
Create a new 'SubstitutionField'.
source code
 
GetHelp(self)
Generate help text about this field in structured text format.
source code

Inherited from fields.TupleField: FormatValueAsHtml, GetSubfields, GetValueFromDomNode, MakeDomNodeForValue, ParseFormValue, Validate

Inherited from fields.Field: FormatValueAsText, GetBriefDescription, GetDefaultValue, GetDescription, GetHtmlFormFieldName, GetHtmlHelp, GetName, GetTitle, IsComputed, IsHidden, IsReadOnly, ParseTextValue, SetName, __repr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from fields.Field: form_field_prefix

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, **properties)
(Constructor)

source code 

Create a new 'SubstitutionField'.

By default, the pattern and replacement string are empty.

Overrides: object.__init__

GetHelp(self)

source code 

Generate help text about this field in structured text format.

Overrides: fields.Field.GetHelp
(inherited documentation)