def print_tree ( self , indent = 2 ) : config . LOGGER . info ( "{indent}{data}" . format ( indent = "   " * indent , data = str ( self ) ) ) for child in self . children : child . print_tree ( indent + 1 )
python print tree recursion
print_tree : prints out structure of tree Args : indent ( int ) : What level of indentation at which to start printing Returns : None
def print_tree(self, indent=2):
        """ print_tree: prints out structure of tree
            Args: indent (int): What level of indentation at which to start printing
            Returns: None
        """
        config.LOGGER.info("{indent}{data}".format(indent="   " * indent, data=str(self)))
        for child in self.children:
            child.print_tree(indent + 1)