%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/vdo/statistics/ |
Current File : //lib/python2.7/site-packages/vdo/statistics/StatFormatter.pyc |
� .�t_c @ sB d Z d d l Z d e f d � � YZ d e f d � � YZ d S( sc DisplaySpec $Id: //eng/vdo-releases/magnesium/src/python/vdo/statistics/StatFormatter.py#1 $ i����Nt StatFormatterc B s/ e Z d Z e e d � Z d � Z d � Z RS( s� An object which formats labeled values. Formatters are able to represent all of the verbose formatting for vdoStats and vdoMonitor (the df-style formatting in vdoStats is done by hand). A formatter is specified by supplying a description of the format for each level of the hierarchy of labeled values. If the values have more levels than the formatter has specified, the final level specification will be applied to all remaining value levels. A level specification is specified as a hash with any of the following keys: displayFilter: A function which takes a LabeledValue and return True if that value (and its children) should be displayed. Defaults to a tautology. indent: The additional indentation to apply from this level down. Defaults to no additional indentation. joiner: The string to use for joining label-value pairs at the current level. In YAML mode, defaults to a newline, otherwise defaults to a space. namer: The way of naming the current level. Can be any of these: None: Don't name this level list: A list of indexes into the value list at this level, the name of the level will be the concatenation of the values at those indexes. If the first element of the list is a string, it will be used as a prefix for the name. '=': Use the label of the value at this level as the name, use an equals sign to connect the name to the values '+': Use the label of the value at this level as the name, regardless of the formatter's mode string: Any other string will be used as the name True: Any other true value will use the label as the name if the mode indicates that the level should be named and otherwise won't name the level (non-hierarchical, multivalued levels don't get named). c C s� | | _ | | _ d | _ | j � x&