2020-08-08 17:51:34 +00:00
|
|
|
from rich.console import Console
|
2020-08-10 15:37:46 +00:00
|
|
|
from rich.panel import Panel
|
2020-08-08 17:51:34 +00:00
|
|
|
from rich.pretty import Pretty
|
|
|
|
|
|
|
|
DATA = {
|
2020-08-24 16:26:30 +00:00
|
|
|
"foo": [1, 2, 3, (), {}, (1, 2, 3), {4, 5, 6, (7, 8, 9)}, "Hello, World"],
|
2020-08-10 15:37:46 +00:00
|
|
|
"bar": [None, (False, True)] * 2,
|
2020-10-20 14:03:28 +00:00
|
|
|
"Dune": {
|
|
|
|
"names": {
|
|
|
|
"Paul Atriedies",
|
|
|
|
"Vladimir Harkonnen",
|
|
|
|
"Thufir Haway",
|
|
|
|
"Duncan Idaho",
|
|
|
|
}
|
|
|
|
},
|
2020-08-08 17:51:34 +00:00
|
|
|
}
|
|
|
|
console = Console()
|
2020-08-10 15:37:46 +00:00
|
|
|
for w in range(130):
|
|
|
|
console.print(Panel(Pretty(DATA), width=w))
|