Colored IP adress in a Talbe #2025
-
Hey, is there a way to correctly color an IP adress within a table ? right now it is not rendered as nicely as a rich print from rich.table import Table
from rich import print
if __name__ == '__main__':
ip = "192.168.1.1:8080"
table = Table(title=None, box=None)
table.add_column("", justify="right", style="cyan")
table.add_row(ip)
print(table)
print(ip) |
Beta Was this translation helpful? Give feedback.
Answered by
willmcgugan
Mar 4, 2022
Replies: 1 comment 1 reply
-
You can set |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
samsja
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can set
highlight=True
on the table.