Package qm :: Package test :: Package classes :: Module python_label :: Class PythonLabel
[hide private]
[frames] | no frames]

Class PythonLabel

source code

label.Label --+
              |
             PythonLabel

A 'PythonLabel' is a 'Label' that uses the 'a.b.c' naming scheme.

A 'PythonLabel' is a 'Label' whose separator character is the period and whose components consist of lower-case letters, numerals, and underscores. These labels have the property that they can be easily mapped to filenames on most operating systems; all valid labels are valid filenames (replacing '.' with '/') and two different labels will always map to two different filenames.

Instance Methods [hide private]
 
IsValid(self, label, is_component)
Returns true if this label is not valid.
source code

Inherited from label.Label: Basename, Dirname, Join, Split, SplitLeft, __init__, __str__

Class Variables [hide private]
  _sep = '.'
The separator character used to separate components.
  __valid_label_regexp = re.compile(r'[-a-z0-9_\.]+$')
A compiled regular expression that matches valid labels.
Method Details [hide private]

IsValid(self, label, is_component)

source code 

Returns true if this label is not valid.

returns -- True if this label is not valid.

Overrides: label.Label.IsValid