mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 01:58:24 +00:00
words
This commit is contained in:
parent
b7563b3d63
commit
d5229e56e9
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
Panel
|
||||
=====
|
||||
|
||||
To draw a border around any content construct a :class:`~rich.panel.Panel` object, with any *renderable* as the first positional argument. Here's an example::
|
||||
To draw a border around any content construct a :class:`~rich.panel.Panel` object with any *renderable* as the first positional argument. Here's an example::
|
||||
|
||||
from rich import print
|
||||
from rich.panel import Panel
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Tables
|
||||
======
|
||||
|
||||
Rich's :class:`~rich.table.Table` class offers a variety ways of rendering tabular data to the terminal.
|
||||
Rich's :class:`~rich.table.Table` class offers a variety of ways to render tabular data to the terminal.
|
||||
|
||||
To render a table, construct a :class:`~rich.table.Table` object, add columns with :meth:`~rich.table.Table.add_column`, and rows with :meth:`~rich.table.Table.add_row` -- then print it to the console.
|
||||
|
||||
|
@ -40,6 +40,6 @@ This produces the following output:
|
|||
</pre>
|
||||
|
||||
|
||||
Rich is quite smart about rendering the table. It will adjust the columns widths to fit the contents and will wrap text if it doesn't fit. You can also add anything that Rich knows how to render as a title or row cell (even another table)!
|
||||
Rich is quite smart about rendering the table. It will adjust the column widths to fit the contents and will wrap text if it doesn't fit. You can also add anything that Rich knows how to render as a title or row cell (even another table)!
|
||||
|
||||
The :class:`~rich.table.Table` class offers a number of configuration options to set the look and feel of the table, including how the borders are rendered, and the style and alignment of the columns.
|
||||
The :class:`~rich.table.Table` class offers a number of configuration options to set the look and feel of the table, including how borders are rendered and the style and alignment of the columns.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue