Home | Trees | Indices | Help |
---|
|
A 'Label' identifies an entity.
A 'Label' is a generalization of a filename. Like filenames, labels consist of one or more directories followed by a basename. However, the format used for a label need not be the same as that used by filenames.
Each label class defines a separator character to take the place of the '/' character used by many file systems.
All labels are relative labels; no label may begin with a separator character.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Construct a new 'Label'. 'label' -- A string giving the value of the label. |
Combine this label and the 'labels' into a single label. 'labels' -- A sequence of strings giving the components of the new label. All but the last are taken as directory names; the last is treated as a basename. |
Split the label into a pair '(directory, basename)'. returns -- A pair '(directory, basename)', each of which is a label. It is always true that 'directory.join(basename)' will return a label equivalent to the original label. |
Split the label into a pair '(parent, subpath)'. This is the same operation as Split, except the split occurs at the leftmost separator, not the rightmost. returns -- A pair '(directory, basename)', each of which is a label. It is always true that 'directory.join(basename)' will return a label equivalent to the original label. |
Return the basename for the label. returns -- A string giving the basename for the label. The value returned for 'l.basename()' is always the same as 'l.split()[1]'. |
Return the directory name for the 'label'. returns -- A string giving the directory name for the 'label'. The value returned for 'l.dirname()' is always the same as 'l.split()[0]'. |
Returns true if 'label' is valid. 'label' -- The string being tested for validity. 'is_component' -- True if the string being tested is just a single component of a label path. returns -- True if 'label' is not valid. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:40 2011 | http://epydoc.sourceforge.net |