stouputils.print.debugging module#
- whatisit(*values: ~typing.Any, print_function: ~collections.abc.Callable[[...], None] = <function debug>, flush: bool = True, max_length: int = 250, color: str = '\x1b[96m', text: str = 'What is it?', **print_kwargs: ~typing.Any) None[source]#
Print the type of each value and the value itself, with its id and length/shape.
The output format is: “type, <id id_number>: (length/shape) value”
- Parameters:
values (Any) – Values to print
print_function (Callable) – Function to use to print the values (default: debug())
max_length (int) – Maximum length of the value string to print (default: 250)
color (str) – Color of the message (default: CYAN)
text (str) – Text in the message (replaces “DEBUG”)
print_kwargs (dict) – Keyword arguments to pass to the print function
- breakpoint(*values: ~typing.Any, print_function: ~collections.abc.Callable[[...], None] = <function warning>, flush: bool = True, text: str = 'BREAKPOINT (press Enter)', **print_kwargs: ~typing.Any) None[source]#
Breakpoint function, pause the program and print the values.
- Parameters:
values (Any) – Values to print
print_function (Callable) – Function to use to print the values (default: warning())
text (str) – Text in the message (replaces “WARNING”)
print_kwargs (dict) – Keyword arguments to pass to the print function