| 1 | from pytermgui import ColorPicker, pretty, terminal, tim |
| 2 | |
| 3 | tim.alias("code", "@black #auto dim") |
| 4 | |
| 5 | with terminal.record() as recording: |
| 6 | tim.print("[italic]Everything[/] you print will be captured!") |
| 7 | tim.print() |
| 8 | tim.print( |
| 9 | "By default, only [code]PTG[/]'s prints functions are affected," |
| 10 | + "\nbut by overwriting [code]sys.stdout.write[/] you can capture any Python output." |
| 11 | ) |