reconfigure.nodes

class reconfigure.nodes.IncludeNode(files)[source]

A node that indicates a junction point between two config files

class reconfigure.nodes.Node(name=None, *args, **kwargs)[source]

A base node class for the Node Tree. This class represents a named container node.

append(node)[source]
get(name, default=None)[source]
Returns:a child node by its name or default
get_all(name)[source]
Returns:list of child nodes with supplied name
indexof(node)[source]
Returns:index of the node in the children array or None if it’s not a child
remove(node)[source]
replace(name, node=None)[source]

Replaces the child nodes by name

Parameters:node – replacement node or list of nodes
n.append(Node('a'))
n.append(Node('a'))
n.replace('a', None)
assert(len(n.get_all('a')) == 0)
set_property(name, value)[source]

Creates or replaces a child PropertyNode by name.

class reconfigure.nodes.PropertyNode(name, value, comment=None)[source]

A node that serves as a property of its parent node.

class reconfigure.nodes.RootNode(name=None, *args, **kwargs)[source]

A special node class that indicates tree root

Previous topic

reconfigure.parsers

Next topic

reconfigure.includers

This Page