from rich.console import Console from rich.tree import Tree # Create a tree tree = Tree("File System") # one subtree docs = tree.add("python") docs.add("lab1.py") docs.add("lab1-improved-the-next-day.py") # other subtree pics = tree.add("pictures") pics.add("vacation.jpeg") pics.add("family.png") # third section tree.add("README.md") # Print the tree console = Console() console.print(tree)