summaryrefslogtreecommitdiffstats
path: root/examples/overflow.py
blob: 5adaa3dbed09a02d7207e1e1b6c3b93af3cd7904 (plain)
1
2
3
4
5
6
7
8
9
10
11
from typing import List
from rich.console import Console, OverflowMethod

console = Console(width=14)
supercali = "supercalifragilisticexpialidocious"

overflow_methods: List[OverflowMethod] = ["fold", "crop", "ellipsis"]
for overflow in overflow_methods:
    console.rule(overflow)
    console.print(supercali, overflow=overflow, style="bold blue")
    console.print()