anytree icon indicating copy to clipboard operation
anytree copied to clipboard

Python tree data library

Results 72 anytree issues
Sort by recently updated
recently updated
newest added

forget to import ZigZagGroupIter module

Hey, I'm trying the example snippet for creating an image of the weighted edges tree using DotExporter and am getting errors. Python version: 3.6.9 The code snippet I tried is...

Changed from python object ids to a simple counter as DOT node name. This way identical trees will produce identical DOT output, regardless of their location in memory. Doctests now...

This iterator ascends from a starting node upwards toward the root of the tree. Iteration stops when it reaches the root. Somewhat different from the other iterators, as it will...

Trying to use the JSON feature on some trees that have reoccurring Nodes that I turn into SymLink Nodes. Below is a simple case that show cases the issue I'm...

I have a custom `Comment` class inheriting from `NodeMixin`. This class has a custom `__repr__` implementation producing a string with two newline characters: ``` def __repr__(self): return f"▲ {self.score} {italic(self.author)}\n{color(blocked(underline(self.title)),...

Is there a way to be able to create iterate inside a RenderTree? For example, I want to print a tree labeled 1, 2, 3,... before each child. I want...

Exposed the PreOrderIter filter_ argument on DotExporter and UniqueDotExporter. Also added the maxlevel arg to UniqueDotExporter, as well as fixing its nodenamefunc and nodeattrfunc behaviour.

``` from anytree import Node, SymlinkNode from anytree.exporter import DotExporter, JsonExporter, DictExporter root = Node(name="root") a = Node(name="a", parent=root) b = Node(name="b", parent=root) c = SymlinkNode(target=a, parent=b) exporter = JsonExporter(indent=2,...

Hi! It's interesting how some people deal with Inserting data from nodes to SQL database. If you have some code example, can you share it here?