Skip to content
Discussion options

You must be logged in to vote

Sure. You can use rich.columns,Columns here.

from rich.columns import Columns
from rich.console import Group, Console
from rich.pretty import Pretty
from rich.text import Text
from rich.tree import Tree

console = Console()
d = {"Hello", "world"}
tree = Tree("hello")
tree.add(Columns([Text("World"), Pretty(d)]))
console.print(tree)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@abey79
Comment options

Answer selected by abey79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants