Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Draws ASCII trees.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for asciitree, version 0.3.3
Filename, size File type Python version Upload date Hashes
Filename, size asciitree-0.3.3.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page