mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 10:08:40 +00:00
table improvements
This commit is contained in:
parent
a7396aa6b8
commit
11c0022439
12 changed files with 76 additions and 21 deletions
|
@ -14,4 +14,10 @@ Here's an example of how to set up a rich logger::
|
|||
)
|
||||
|
||||
log = logging.getLogger("rich")
|
||||
log.info("Hello, World!")
|
||||
log.info("Hello, World!")
|
||||
|
||||
Rich logs won't process console markup by default, but you can enable markup per log statement with the ``extras`` argument as follows::
|
||||
|
||||
log.error("[bold red blink]Server is shutting down![/]", extras={"markup": True})
|
||||
|
||||
There are a number of options you can use to configure logging output, see the :class:`~rich.logging.RichHandler` reference for details.
|
|
@ -80,11 +80,9 @@ When you add a task it is automatically *started*, which means it will show a pr
|
|||
Auto refresh
|
||||
~~~~~~~~~~~~
|
||||
|
||||
By default, the progress information will refresh 10 times a second. Refreshing at a predictable rate can make numbers more readable if they are updating quickly. Auto refresh can also prevent excessive rendering to the terminal.
|
||||
By default, the progress information will refresh 10 times a second. You can set the refresh rate with the ``refresh_per_second`` argument on the :class:`~rich.progress.Progress` constructor. You should set this to something lower than 10 if you know your updates will not be that frequent.
|
||||
|
||||
You can set the refresh rate with the ``refresh_per_second`` argument on the :class:`~rich.progress.Progress` constructor. You could set this to something lower than 10 if you know your updates will not be that frequent.
|
||||
|
||||
You can disable auto-refresh by setting ``auto_refresh=False`` on the constructor and call :meth:`~rich.progress.Progress.refresh` manually when there are updates to display.
|
||||
You might want to disable auto-refresh entirely if your updates are not very frequent, which you can do by setting ``auto_refresh=False`` on the constructor. If you disable auto-refresh you will need to call :meth:`~rich.progress.Progress.refresh` manually after updating your task(s).
|
||||
|
||||
Columns
|
||||
~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue