Dict of dicts object to a graphical tree

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karthikselvakum
    New Member
    • Dec 2010
    • 1

    #1

    Dict of dicts object to a graphical tree

    I tried pygraphviz and passed dict of dicts object to it but i Only got a single level of the dict object not the entire tree . Please help me to draw a entire tree with dict object .

    Object is something like :

    >>> t
    {'outlook': {'rainy': {'windy': {'FALSE': 'yes', 'TRUE': 'no'}}, 'overcast': 'yes', 'sunny': {'humidity': {'high': 'no', 'normal': 'yes'}}}}
    >>> A=AGraph(t)
    >>> A.layout(prog=' dot')

    i attached the final image what i got .
    Attached Files
Working...