pretty_print ¤
Classes:
-
Property
–A (property name, property value) pair
-
PropertyPrinter
–When you have (property name, property value) pairs
Property dataclass
¤
Property(
name: str,
value: Any,
alt_value: Any = None,
extra: str | list[str] = "",
is_addr: bool = False,
use_hex: bool = True,
)
PropertyPrinter ¤
PropertyPrinter(
*,
name_color_func: Callable[[str], str] | None = None,
value_color_func: Callable[[str], str] | None = None,
section_color_func: Callable[[str], str] | None = None,
indent_size: int = 2,
)
When you have (property name, property value) pairs that you want to print, each on a new line.
Methods:
-
add
–Add a group of properties that should be aligned.
-
dump
–Return the built up string.
-
print
–Print the built up string.
-
clear
–Clear the built up string.
-
indent
–Increase indentation level by one.
-
unindent
–Decrease indentation level by one.
-
write
–Write raw string to the PropertyPrinter.
-
start_section
–Start a named section of properties that will have
-
end_section
–End a section.
-
set_padding
–Set the distance between the end of the longest
Attributes: