anytree
is a Lightweight Python Tree Data Structure.
Questions tagged [anytree]
67 questions
0
votes
0 answers
Error in converting a dotfile to image by graphviz
I made a tree graph by anytree module and I want to get a png file out of it. I tried graphviz (dotfile to png) but got an error:
What is the problem?
Traceback (most recent call last):
File "", line 1, in
BOM.treegraph()
…
0
votes
0 answers
Python - How to Create a Genealogical Tree
I would like to develop a Genealogy Tree with Python.
I'm using the Django Framework 2.1.
I have a model called "Animal":
class Animal(models.Model):
id = models.AutoField(primary_key=True)
birth_date = models.DateField( null=True)
…

WitnessTruth
- 539
- 2
- 9
- 27
0
votes
2 answers
manuplating data in anytree node
I hope you guys are fine.
I want to manipulate data which is in any-tree(python library) node
I am storing my dictionary in my node and want to take values from node and manipulate it.
My code:
data={
"man":False,
…

Sohaib Anwaar
- 1,517
- 1
- 12
- 29
0
votes
1 answer
Python 2.7: ljust not padding correctly
The following code is not padding strings correctly
for pre, fill, node in anytree.RenderTree(tree):
prefix = ("{pre_print}{node_print}".format(pre_print=pre.encode('utf-8'), node_print=node.name)).ljust(120, '-')
…

MPA95
- 175
- 2
- 11
0
votes
1 answer
Python anytree application challenges with my jupyter notebook
I am working in python 3.7.0 through a 5.6.0 jupyter notebook inside Anaconda Navigator 1.9.2 running in a windows 7 environment. It seems like I am assuming a lot of overhead, and from the jupyter notebook, python doesn’t see the anytree…

SteveMW
- 33
- 5
0
votes
1 answer
Exporting / Importing trees created with python anytree 2.4.3 library
I create a tree with anytree library. I want to be able to modify it, then export - save it to disk, and import it back with the modifications. For instance, the example tree:
udo = Node("Udo")
marc = Node("Marc", parent=udo)
lian = Node("Lian",…

gaurwraith
- 143
- 8
-1
votes
2 answers
Get parent node name in anytree
I have created a tree using anytree for my custom taxonomy and I am able to search the tree using:
from anytree import find
name='c'
find(root, lambda node: node.name == name)
This returns an object of Node class that looks something like…

satish silveri
- 358
- 3
- 17