Skip to content

mbr/asciitree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII Trees

[![Run on Repl.it](https://repl.it/badge/github/mbr/asciitree)](https://repl.it/github/mbr/asciitree)

asciitree
 +-- sometimes
 |   +-- you
 +-- just
 |   +-- want
 |       +-- to
 |       +-- draw
 +-- trees
 +-- in
     +-- your
         +-- terminal
from asciitree import LeftAligned
from collections import OrderedDict as OD

tree = {
    "asciitree": OD([
        ("sometimes",
            {"you": {}}),
        ("just",
            {"want": OD([
                ("to", {}),
                ("draw", {}),
            ])}),
        ("trees", {}),
        ("in", {
            "your": {
                "terminal": {}
            }
        })
    ])
}

tr = LeftAligned()
print(tr(tree))

Read the documentation at http://pythonhosted.org/asciitree

About

+-- ASCII Trees.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages