Will McGugan
  • Personal
  • Photography
  • Tech
  • About

Posts in January, 2021

Jan 10, 2021
in Tech

Rendering a tree view in the terminal with Python and Rich

The latest version of Rich adds a tree view. Here's an example of one:

The labels of each branch in the tree can be text or anything else that rich can render. The guide lines can have a color per-branch and one of three styles; normal, thick, and double line.

The API to generate these trees is super simple and currently has just one public method to add a new branch.

Here's a simple example demonstrating that money does, in fact, grow on trees. continue reading…

2022

  • OCTOBER
  • APRIL
  • MARCH
  • FEBRUARY
  • JANUARY

2021

  • DECEMBER
  • SEPTEMBER
  • AUGUST
  • JUNE
  • FEBRUARY
  • JANUARY

2020

  • AUGUST
  • JUNE
  • MAY
  • MARCH
  • FEBRUARY
  • JANUARY

2019

  • NOVEMBER
  • JUNE
  • JANUARY

2018

  • OCTOBER
  • AUGUST
  • JULY
  • APRIL

2017

  • OCTOBER
  • SEPTEMBER
  • AUGUST
  • JUNE
  • MAY
  • APRIL

2016

  • DECEMBER
  • AUGUST
  • JULY
  • MAY
  • APRIL
  • MARCH
  • FEBRUARY

2015

  • DECEMBER
  • NOVEMBER
  • JUNE
  • APRIL
  • MARCH
  • FEBRUARY

2013

  • NOVEMBER
  • AUGUST
  • JUNE

2012

  • DECEMBER
  • MAY
  • APRIL
  • MARCH

2011

  • JUNE
  • MAY
  • MARCH
  • FEBRUARY
  • JANUARY

2010

  • AUGUST
  • JUNE
  • MAY

2009

  • DECEMBER
  • OCTOBER
  • SEPTEMBER
  • AUGUST
  • JULY
  • JUNE
  • MAY
  • APRIL
  • MARCH
  • FEBRUARY
  • JANUARY

2008

  • DECEMBER
  • NOVEMBER
  • OCTOBER
  • SEPTEMBER
  • AUGUST
  • JULY
  • JUNE
  • MARCH
  • FEBRUARY
  • JANUARY

2007

  • DECEMBER
  • NOVEMBER
  • OCTOBER
  • SEPTEMBER
  • JULY
  • JUNE
  • MAY
  • APRIL
  • MARCH
  • JANUARY

2006

  • AUGUST
  • JUNE

© 2015 Will McGugan Sign In A Moya Techblog