Skip to content

Instantly share code, notes, and snippets.

@rjbs
Created March 21, 2023 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjbs/55c3689fbd464c7b3a006d0d28d2bd79 to your computer and use it in GitHub Desktop.
Save rjbs/55c3689fbd464c7b3a006d0d28d2bd79 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from rich import print
from rich.table import Table
from rich.text import Text
table = Table(show_header=True, header_style="bold magenta")
table.add_column("Issue", width=8)
table.add_column("S", width=1)
table.add_column("Pri", width=3)
table.add_column("Title", no_wrap=True)
too_long = """\
This is a full line sentence and it fills a whole line so it overflows a cell!\
"""
for i in range(10):
table.add_row("ABC-123", "X", "123", " ".join([too_long, too_long]))
print(table)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment