finesse.tree.TreeNode.draw_tree¶
- TreeNode.draw_tree(self, fn_name=None, title=None, show_max_children=None)¶
Draws the solution tree in text form.
Based on https://stackoverflow.com/a/49638425/2251982.
- Parameters
fn_name : callable, optional
Function to return the name of a
TreeNode
given theTreeNode
itself. Defaults to usingTreeNode.name
.title : str, optional
The tree title. If not specified, no title is printed.
show_max_children : int, optional
Maximum number of children to show in the tree; defaults to showing all children.
- Returns
str
The tree in textual form.