buildtest.utils.print

Module Contents

Functions

print_file_content(file_path, title, lexer, theme[, ...])

This method will print the content of a file using Rich Syntax.

print_content(content, title, lexer, theme[, ...])

This method will print the content using Rich Syntax.

buildtest.utils.print.print_file_content(file_path, title, lexer, theme, show_last_lines=None)[source]

This method will print the content of a file using Rich Syntax. :param file_path: Specify file to print the content of. :type file_path: str :param title: The title to use when printing the content. :type title: str :param lexer: The lexer to use when printing the content. :type lexer: str :param theme: The theme to use when printing the content. :type theme: str :param show_last_lines: Show last N lines of file content. If set to None, will print entire file content. :type show_last_lines: int

buildtest.utils.print.print_content(content, title, lexer, theme, show_last_lines=None)[source]

This method will print the content using Rich Syntax.

Parameters:
  • content (str) – Specify file to print the content of.

  • title (str) – The title to use when printing the content.

  • lexer (str) – The lexer to use when printing the content.

  • theme (str) – The theme to use when printing the content.

  • show_last_lines (int) – Show last N lines of file content. If set to None, will print entire file content.