def __init__(self, **kwargs): k = { 'parser': SSVParser(maxsplit=1), 'builder': BoundBuilder(SNMPDData), } k.update(kwargs) Reconfig.__init__(self, **k)
def __init__(self, **kwargs): k = { 'parser': SSVParser(separator=':'), 'builder': BoundBuilder(GroupsData), } k.update(kwargs) Reconfig.__init__(self, **k)
def __init__(self, **kwargs): k = { 'parser': SSVParser(separator=' '), 'builder': BoundBuilder(PublicAddressesData), } k.update(kwargs) Reconfig.__init__(self, **k)
class SSVParserTest (BaseParserTest): parser = SSVParser(continuation='\\') source = """# line1 # long comment a\tbc\\ \tdef efgh # line2 """ parsed = RootNode( None, Node( 'line', Node('token', PropertyNode('value', 'a')), Node('token', PropertyNode('value', 'bc')), Node('token', PropertyNode('value', 'def')), comment='line1\nlong comment', ), Node( 'line', Node('token', PropertyNode('value', 'efgh')), comment='line2', ), ) @property def stringified(self): return """# line1
def __init__(self, **kwargs): k = { 'parser': SSVParser(), 'builder': BoundBuilder(NodesData), } k.update(kwargs) Reconfig.__init__(self, **k)