File: overflow.py

package info (click to toggle)
rich 13.9.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,284 kB
  • sloc: python: 29,157; makefile: 29
file content (11 lines) | stat: -rw-r--r-- 370 bytes parent folder | download | duplicates (4)
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()