* blog post * words * words * more words * Update docs/blog/posts/rich-inspect.md Co-authored-by: Dave Pearson <davep@davep.org> * Update docs/blog/posts/rich-inspect.md Co-authored-by: Dave Pearson <davep@davep.org> --------- Co-authored-by: Dave Pearson <davep@davep.org>
17 lines
312 B
Python
17 lines
312 B
Python
from rich import inspect
|
|
from rich.console import Console
|
|
|
|
c = Console(record=True, width=110)
|
|
|
|
f = open("foo.txt", "w")
|
|
|
|
inspect(f, console=c)
|
|
c.save_svg("inspect1.svg")
|
|
|
|
|
|
inspect(f, console=c, methods=True)
|
|
c.save_svg("inspect2.svg")
|
|
|
|
|
|
inspect(f, console=c, methods=True, help=True)
|
|
c.save_svg("inspect3.svg")
|