module documentation

Graphically display a Tree.

Class TreeSegmentWidget A canvas widget that displays a single segment of a hierarchical tree. Each TreeSegmentWidget connects a single "node widget" to a sequence of zero or more "subtree widgets". By default, the bottom of the node is connected to the top of each subtree by a single line...
Class TreeView No class docstring; 0/6 instance variable, 1/6 method documented
Class TreeWidget A canvas widget that displays a single Tree. TreeWidget manages a group of TreeSegmentWidgets that are used to display a Tree.
Function demo Undocumented
Function draw_trees Open a new window containing a graphical diagram of the given trees.
Function tree_to_treesegment Convert a Tree into a TreeSegmentWidget.
Function _tree_to_treeseg Undocumented
def demo(): (source)

Undocumented

def draw_trees(*trees): (source)

Open a new window containing a graphical diagram of the given trees.

Returns
NoneUndocumented
def tree_to_treesegment(canvas, t, make_node=TextWidget, make_leaf=TextWidget, **attribs): (source)

Convert a Tree into a TreeSegmentWidget.

Parameters
canvasUndocumented
tUndocumented
make_nodeA CanvasWidget constructor or a function that creates CanvasWidgets. make_node is used to convert the Tree's nodes into CanvasWidgets. If no constructor is specified, then TextWidget will be used.
make_leafA CanvasWidget constructor or a function that creates CanvasWidgets. make_leaf is used to convert the Tree's leafs into CanvasWidgets. If no constructor is specified, then TextWidget will be used.
**attribsAttributes for the canvas widgets that make up the returned TreeSegmentWidget. Any attribute beginning with 'tree_' will be passed to all TreeSegmentWidgets (with the 'tree_' prefix removed. Any attribute beginning with 'node_' will be passed to all nodes. Any attribute beginning with 'leaf_' will be passed to all leaves. And any attribute beginning with 'loc_' will be passed to all text locations (for Trees).
def _tree_to_treeseg(canvas, t, make_node, make_leaf, tree_attribs, node_attribs, leaf_attribs, loc_attribs): (source)

Undocumented