How to get table string? #1363
Unanswered
SadeghPouriyanZadeh
asked this question in
Q&A
Replies: 1 comment
-
I wouldn't recommend returning a string with formatting or ansi codes from repr and str. They may end up formatted badly depending on the context. However if you really want to do it, you can capture the output. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The documentation only shows how to print tables. But we want to use rich table as string to return from
__repr__
and__str__
of my custom classes. Is there any way to get rich tables string?Beta Was this translation helpful? Give feedback.
All reactions