mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 10:08:40 +00:00
faster pretty
This commit is contained in:
parent
f29fdf5f57
commit
b7e66ced66
6 changed files with 45 additions and 15 deletions
|
@ -1,12 +1,12 @@
|
|||
from rich.console import Console
|
||||
from rich.panel import Panel
|
||||
from rich.pretty import Pretty
|
||||
|
||||
DATA = {
|
||||
"foo": [1, 2, 3, (1, 2, 3), {4, 5, 6, (7, 8, 9)}, "Hello, World"],
|
||||
"bar": [None, False, True],
|
||||
"bar": [None, (False, True)] * 2,
|
||||
}
|
||||
|
||||
console = Console()
|
||||
for w in range(100):
|
||||
console.print(DATA, width=w)
|
||||
for w in range(130):
|
||||
console.print(Panel(Pretty(DATA), width=w))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue