lib/util/log.py
def _get_parser():
        '''
        Compiles and returns a regex parser for parsing fields.

        The regex matches something in the form: '%(foo) 15s'
          %       - prefix
          (name)  - named field (optional)
          0       - for numbers, left pad with 0, override space (optional)
          -       - left-pad, override 0 (optional)
          space   - whitespace before before positive numbers (optional)
          +       - for numbers, always include +/- sign (optional)
          number  - field width

        NOTE : Attribute names must match regex parameter names.
        '''

        field_pattern = ''.join((
            r'%',
            r'(?:\((?P<name>\w+)\))?',
            r'(?P<zero>0)?',
            r'(?P<minus>-)?',
            r'(?P<space>\s)?',
            r'(?P<plus>\+)?',
            r'(?P<width>\d+)?',
            r'(?P<point>(?:\.\d+))?',
            r'(?P<conv>[hlL]*[srxXeEfFdiou])',
        ))

        return re.compile(field_pattern)

        Compiles and returns a regex parser for parsing fields.

        The regex matches something in the form: '%(foo) 15s'
          %       - prefix
          (name)  - named field (optional)
          0       - for numbers, left pad with 0, override space (optional)
          -       - left-pad, override 0 (optional)
          space   - whitespace before before positive numbers (optional)
          +       - for numbers, always include +/- sign (optional)
          number  - field width

        NOTE : Attribute names must match regex parameter names.
        
Compiles and returns a regex parser for parsing fields.

NOTE : Attribute names must match regex parameter names.
Compiles and returns a regex parser for parsing fields . NOTE : Attribute names must match regex parameter names .
def _get_parser():
        field_pattern = ''.join((
            r'%',
            r'(?:\((?P<name>\w+)\))?',
            r'(?P<zero>0)?',
            r'(?P<minus>-)?',
            r'(?P<space>\s)?',
            r'(?P<plus>\+)?',
            r'(?P<width>\d+)?',
            r'(?P<point>(?:\.\d+))?',
            r'(?P<conv>[hlL]*[srxXeEfFdiou])',
        ))
        return re.compile(field_pattern)
def _get_parser ( ) : field_pattern = '' . join ( ( r'%' , r'(?:\((?P<name>\w+)\))?' , r'(?P<zero>0)?' , r'(?P<minus>-)?' , r'(?P<space>\s)?' , r'(?P<plus>\+)?' , r'(?P<width>\d+)?' , r'(?P<point>(?:\.\d+))?' , r'(?P<conv>[hlL]*[srxXeEfFdiou])' , ) ) return re . compile ( field_pattern )
Compiles and returns a regex parser for parsing fields.
Compiles and returns a regex parser for parsing fields .
'''
        Compiles and returns a regex parser for parsing fields.

        The regex matches something in the form: '%(foo) 15s'
          %       - prefix
          (name)  - named field (optional)
          0       - for numbers, left pad with 0, override space (optional)
          -       - left-pad, override 0 (optional)
          space   - whitespace before before positive numbers (optional)
          +       - for numbers, always include +/- sign (optional)
          number  - field width

        NOTE : Attribute names must match regex parameter names.
        '''