mirror of
https://github.com/Textualize/rich.git
synced 2025-08-24 20:24:17 +00:00
added descriptive comments
This commit is contained in:
parent
2eed45e627
commit
0cf528d9a8
1 changed files with 6 additions and 0 deletions
|
@ -24,21 +24,27 @@ def print_table():
|
||||||
|
|
||||||
|
|
||||||
# Prints table
|
# Prints table
|
||||||
|
print("print table to the console")
|
||||||
print_table()
|
print_table()
|
||||||
|
|
||||||
# Get console output as text
|
# Get console output as text
|
||||||
|
print("geting console output as text")
|
||||||
text = console.export_text()
|
text = console.export_text()
|
||||||
|
|
||||||
# Calling print_table again because console output buffer
|
# Calling print_table again because console output buffer
|
||||||
# is flushed once export function is called
|
# is flushed once export function is called
|
||||||
|
print("print table to the console")
|
||||||
print_table()
|
print_table()
|
||||||
|
|
||||||
# Get console output as html
|
# Get console output as html
|
||||||
# use clear=False so output is not flushed after export
|
# use clear=False so output is not flushed after export
|
||||||
|
print("geting console output as html")
|
||||||
html = console.export_html(clear=False)
|
html = console.export_html(clear=False)
|
||||||
|
|
||||||
# Export text output to table_export.txt
|
# Export text output to table_export.txt
|
||||||
|
print("exporting console output to table_export.txt")
|
||||||
console.save_text("table_export.txt", clear=False)
|
console.save_text("table_export.txt", clear=False)
|
||||||
|
|
||||||
# Export html output to table_export.html
|
# Export html output to table_export.html
|
||||||
|
print("exporting console output to table_export.html")
|
||||||
console.save_html("table_export.html")
|
console.save_html("table_export.html")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue