Display TTY  1
Customise your terminal's output
Loading...
Searching...
No Matches
display_tty.src.my_disp.Disp Class Reference
Collaboration diagram for display_tty.src.my_disp.Disp:
Collaboration graph

Public Member Functions

None __init__ (self, Dict[str, any] toml_content, bool save_to_file=False, str file_name="text_output_run.txt", any file_descriptor=None, bool debug=False, Union[Logging, str, None] logger=None, int success=SUCCESS, int error=ERR, bool log_warning_when_present=True, bool log_errors_when_present=True)
 
None update_disp_debug (self, bool debug)
 
None update_logger_level (self, Union[int, LogLevelTracker.Levels] level=LogLevelTracker.Levels.NOTSET)
 
int update_logging_colour_text (self, Union[str, int] colour, Union[str, int] level_name, logging.Logger logger_instance=None)
 
int update_logging_colour_background (self, Union[str, int] colour, Union[str, int] level_name, logging.Logger logger_instance=None)
 
int add_custom_level (self, int level, str name, Union[int, str] colour_text="", Union[int, str] colour_bg="")
 
None disp_print_custom_level (self, Union[int, str] level, str string, Union[str, None] func_name=None)
 
None disp_print_debug (self, str string="", Union[str, None] func_name=None)
 
None disp_print_info (self, str string="", Union[str, None] func_name=None)
 
None disp_print_warning (self, str string="", Union[str, None] func_name=None)
 
None disp_print_error (self, str string="", Union[str, None] func_name=None)
 
None disp_print_critical (self, str string="", Union[str, None] func_name=None)
 
None log_custom_level (self, Union[int, str] level, str string, Union[str, None] func_name=None)
 
None log_debug (self, str string="", Union[str, None] func_name=None)
 
None log_info (self, str string="", Union[str, None] func_name=None)
 
None log_warning (self, str string="", Union[str, None] func_name=None)
 
None log_error (self, str string="", Union[str, None] func_name=None)
 
None log_critical (self, str string="", Union[str, None] func_name=None)
 
None close_file (self)
 
str get_generated_content (self)
 
str create_string (self, length, character)
 
None display_animation (self, str message="Hello World!", float delay=0.02)
 
None animate_message (self, str message="Hello World!", float delay=0.02)
 
None disp_message_box (self, str msg, str char="#")
 
None disp_round_message_box (self, str msg="Sample text")
 
None disp_diff_side_and_top_message_box (self, str msg)
 
None disp_box_no_vertical (self, str message, str character="@")
 
None disp_vertical_message_box (self, str msg, str character='')
 
None box_vertical_no_horizontal (self, str message, str character="")
 
None title (self, str title)
 
None sub_title (self, str sub_title)
 
None sub_sub_title (self, str sub_sub_title)
 
None message (self, Union[str, list] message)
 
None error_message (self, Union[str, list] message)
 
None success_message (self, Union[str, list] message)
 
None warning_message (self, Union[str, list] message)
 
None question_message (self, Union[str, list] message)
 
None inform_message (self, Union[str, List] message)
 
Union[str, None] tree (self, str title, List[str] data, int offset=0)
 
None append_run_date (self)
 
None test_the_class (self)
 

Data Fields

 toml_content = toml_content
 
str background_colour_key = 'background_colour'
 
str author = "(c) Created by Henry Letellier"
 
int nb_chr = 40
 
bool debug = debug
 
 error = error
 
 success = success
 
int nb_side_walls = 2
 
 log_error_when_present = log_errors_when_present
 
 log_warning_when_present = log_warning_when_present
 
 log_level_tracker = LogLevelTracker()
 
int max_whitespace = self.nb_chr - self.nb_side_walls
 
 title_wall_chr = self.toml_content["TITLE_WALL_CHARACTER"]
 
 sub_title_wall_chr = self.toml_content["SUB_TITLE_WALL_CHARACTER"]
 
 sub_sub_title_wall_chr = self.toml_content["SUB_SUB_TITLE_WALL_CHARACTER"]
 
 message_char = self.toml_content["MESSAGE_CHARACTER"]
 
 message_error_char = self.toml_content["MESSAGE_ERROR_CHARACTER"]
 
 message_success_char = self.toml_content["MESSAGE_SUCCESS_CHARACTER"]
 
 message_inform_char = self.toml_content["MESSAGE_INFORM_CHARACTER"]
 
 message_warning_char = self.toml_content["MESSAGE_WARNING_CHARACTER"]
 
 message_question_char = self.toml_content["MESSAGE_QUESTION_CHARACTER"]
 
 message_animation_delay = self.toml_content[KEY_ANIMATION_DELAY_BLOCKY]
 
 tree_node_char = self.toml_content["TREE_NODE_CHAR"]
 
 tree_node_end_char = self.toml_content["TREE_NODE_END_CHAR"]
 
 tree_line_seperator_char = self.toml_content["TREE_LINE_SEPERATOR_CHAR"]
 
 tree_column_seperator_char = self.toml_content["TREE_COLUMN_SEPERATOR_CHAR"]
 
 file_name = file_name
 
bool save_to_file = save_to_file
 
 file_descriptor = file_descriptor
 
str generated_content = ""
 
 logger = logger
 
str log_level_tracker = "" or colour_text < 0:
 
str toml_content
 
int debug = 2
 

Protected Member Functions

None _setup_logger (self, Union[Logging, str, None] logger)
 
 _create_function (self, name, func_code)
 
None _add_function_to_instance (self, object func_dest, str func_name, str func_code)
 
logging.Logger _check_the_logging_instance (self, logging.Logger logger_instance=None)
 
Union[int, str] _check_colour_data (self, Union[str, int] colour, logging.Logger logger_instance=None)
 
Union[int, str] _check_level_data (self, Union[str, int] level_name, logging.Logger logger_instance=None)
 
Union[None, colorlog.ColoredFormatter] _get_colour_formatter (self, logging.Logger logger_instance=None)
 
str _calculate_required_spaces (self, int string_length)
 
None _open_file (self)
 
bool _is_safe (self, any content)
 
str _tree_node (self, str line, int offset, int index, int max_lenght)
 

Detailed Description

@class Disp
@brief The class in charge of displaying messages with various styles and animations.

@details This class provides methods to display messages in different formats, log messages, and manage output configurations.

Definition at line 43 of file my_disp.py.

Constructor & Destructor Documentation

◆ __init__()

None display_tty.src.my_disp.Disp.__init__ ( self,
Dict[str, any] toml_content,
bool save_to_file = False,
str file_name = "text_output_run.txt",
any file_descriptor = None,
bool debug = False,
Union[Logging, str, None] logger = None,
int success = SUCCESS,
int error = ERR,
bool log_warning_when_present = True,
bool log_errors_when_present = True )
@brief Constructor for the Disp class.

@param toml_content Dictionary containing configuration values.
@param save_to_file Boolean indicating whether to save output to a file.
@param file_name Name of the file to save output to.
@param file_descriptor File descriptor for the output file.
@param debug Boolean indicating whether debug mode is enabled.
@param logger Logger instance or name to use for logging.
@param success Integer representing the success status code.
@param error Integer representing the error status code.
@param log_warning_when_present Boolean indicating whether to log warnings when they arise in one of the function calls.
@param log_errors_when_present Boolean indicating whether to log errors when they arise in one of the function calls.

Definition at line 51 of file my_disp.py.

Member Function Documentation

◆ _add_function_to_instance()

None display_tty.src.my_disp.Disp._add_function_to_instance ( self,
object func_dest,
str func_name,
str func_code )
protected
@brief Add a dynamically created function to an instance.

@param func_dest The destination object to add the function to.
@param func_name Name of the function.
@param func_code Code of the function.

Definition at line 170 of file my_disp.py.

◆ _calculate_required_spaces()

str display_tty.src.my_disp.Disp._calculate_required_spaces ( self,
int string_length )
protected
@brief Generate the required amount of spaces for the padding of the shape.

@param string_length The length of the provided string.
@return The number of spaces required for the padding.

Definition at line 827 of file my_disp.py.

◆ _check_colour_data()

Union[int, str] display_tty.src.my_disp.Disp._check_colour_data ( self,
Union[str, int] colour,
logging.Logger logger_instance = None )
protected
@brief Check if the provided colour data is valid.

@param colour The colour to validate.
@param logger_instance The logger instance to use for logging errors.
@return The validated colour or an error code.

Definition at line 236 of file my_disp.py.

◆ _check_level_data()

Union[int, str] display_tty.src.my_disp.Disp._check_level_data ( self,
Union[str, int] level_name,
logging.Logger logger_instance = None )
protected
@brief Check if the provided level data is valid.

@param level_name The level name or number to validate.
@param logger_instance The logger instance to use for logging errors.
@return The validated level name or an error code.

Definition at line 262 of file my_disp.py.

◆ _check_the_logging_instance()

logging.Logger display_tty.src.my_disp.Disp._check_the_logging_instance ( self,
logging.Logger logger_instance = None )
protected
@brief Check if the logger instance is valid.

@param logger_instance The logger instance to validate.
@return A valid logger instance.

Definition at line 212 of file my_disp.py.

◆ _create_function()

display_tty.src.my_disp.Disp._create_function ( self,
name,
func_code )
protected

Definition at line 159 of file my_disp.py.

◆ _get_colour_formatter()

Union[None, colorlog.ColoredFormatter] display_tty.src.my_disp.Disp._get_colour_formatter ( self,
logging.Logger logger_instance = None )
protected
@brief Get the colour formatter from the logger instance.

@param logger_instance The logger instance to retrieve the formatter from.
@return The colour formatter or an error code.

Definition at line 299 of file my_disp.py.

◆ _is_safe()

bool display_tty.src.my_disp.Disp._is_safe ( self,
any content )
protected
@brief Check if an item is safe to write or not.

@param content The item to check.
@return True if the item is safe to write, False otherwise.

Definition at line 862 of file my_disp.py.

◆ _open_file()

None display_tty.src.my_disp.Disp._open_file ( self)
protected
@brief Open the file if required and add the current date and time.

Definition at line 848 of file my_disp.py.

◆ _setup_logger()

None display_tty.src.my_disp.Disp._setup_logger ( self,
Union[Logging, str, None] logger )
protected
@brief Setup the logger for the class.

@param logger The logger to use. If None, a default logger will be used.

Definition at line 110 of file my_disp.py.

◆ _tree_node()

str display_tty.src.my_disp.Disp._tree_node ( self,
str line,
int offset,
int index,
int max_lenght )
protected
@brief Display a line of the tree.

@param line The line to display.
@param offset The offset for the line.
@param index The index of the line.
@param max_lenght The maximum length of the tree.
@return The processed line.
@note The characters displayed in this tree function is managed by the following keys:\n
@note     * TREE_NODE_CHAR\n
@note     * TREE_NODE_END_CHAR\n
@note     * TREE_LINE_SEPERATOR_CHAR\n
@note     * TREE_COLUMN_SEPERATOR_CHAR\n
@example     Here is an example generated by this function:\n
@example     ├─── data1\n
@example     └─── data2

Definition at line 1592 of file my_disp.py.

◆ add_custom_level()

int display_tty.src.my_disp.Disp.add_custom_level ( self,
int level,
str name,
Union[int, str] colour_text = "",
Union[int, str] colour_bg = "" )
@brief Add a custom level to the logger.

@param level The integer value of the custom level.
@param name The name of the custom level.
@param colour_text The text colour for the custom level.
@param colour_bg The background colour for the custom level.
@return The status code of the operation.

Definition at line 492 of file my_disp.py.

◆ animate_message()

None display_tty.src.my_disp.Disp.animate_message ( self,
str message = "Hello World!",
float delay = 0.02 )
@brief Display or dump (to file) a message.

@param message The message to display or dump.
@param delay The delay between each letter.

Definition at line 907 of file my_disp.py.

◆ append_run_date()

None display_tty.src.my_disp.Disp.append_run_date ( self)
@brief Add the date and time at which the program was launched.
@note The text is displayed in the center of the box, it is just difficult to show that in a function comment.\n
@note This is a sample box (characters and dimensions depend on the provided configuration):\n
@example ########################################\n
@example #    Run date: 07/06/2024 22:26:10     #\n
@example ########################################

Definition at line 1695 of file my_disp.py.

◆ box_vertical_no_horizontal()

None display_tty.src.my_disp.Disp.box_vertical_no_horizontal ( self,
str message,
str character = "" )
@brief Print a box format without internal horizontal bars.

@param message The message to display.
@param character The character to use for the box.
@note The text is displayed in the center of the box, it is just difficult to show that in a function comment.\n
@note This is a sample box (characters and dimensions depend on the provided configuration):\n
@example #                            #\n
@example #                            #\n
@example #                            #\n
@example #                            #\n
@example #                            #\n
@example #       Sample text          #\n
@example #                            #\n
@example #                            #\n
@example #                            #\n
@example #                            #\n
@example #                            #\n

Definition at line 1320 of file my_disp.py.

◆ close_file()

None display_tty.src.my_disp.Disp.close_file ( self)
@brief Close the log file if it was opened.

Definition at line 803 of file my_disp.py.

◆ create_string()

str display_tty.src.my_disp.Disp.create_string ( self,
length,
character )
@brief Create a string based on a character and a length.

@param length The length of the string.
@param character The character to use.
@return The created string.

Definition at line 873 of file my_disp.py.

◆ disp_box_no_vertical()

None display_tty.src.my_disp.Disp.disp_box_no_vertical ( self,
str message,
str character = "@" )
@brief Print a box format without internal vertical bars.

@param message The message to display.
@param character The character to use for the box.
@note The text is displayed in the center of the box, it is just difficult to show that in a function comment.\n
@note This is a sample box (characters and dimensions depend on the provided configuration):\n
@example #############################\n
@example          Sample text         \n
@example #############################

Definition at line 1177 of file my_disp.py.

◆ disp_diff_side_and_top_message_box()

None display_tty.src.my_disp.Disp.disp_diff_side_and_top_message_box ( self,
str msg )
@brief Display a message in a box with different side and top characters.

@param msg The message to display.

@note The text is displayed in the center of the box, it is just difficult to show that in a function comment.\n
@note This is a sample box (characters and dimensions depend on the provided configuration):\n
@example _____________________________\n
@example |        Sample text        |\n
@example _____________________________

Definition at line 1107 of file my_disp.py.

◆ disp_message_box()

None display_tty.src.my_disp.Disp.disp_message_box ( self,
str msg,
str char = "#" )
@brief Display a message in a box.

@param msg The message to display.
@param char The character to use for the box.

@note The text is displayed in the center of the box, it is just difficult to show that in a function comment.\n
@note This is a sample box (characters and dimensions depend on the provided configuration):\n
@example #############################\n
@example #        Sample text        #\n
@example #############################

Definition at line 923 of file my_disp.py.

◆ disp_print_critical()

None display_tty.src.my_disp.Disp.disp_print_critical ( self,
str string = "",
Union[str, None] func_name = None )
@brief Print a critical message (using logger).

@param string The message to print.
@param func_name The name of the calling function.

Definition at line 697 of file my_disp.py.

◆ disp_print_custom_level()

None display_tty.src.my_disp.Disp.disp_print_custom_level ( self,
Union[int, str] level,
str string,
Union[str, None] func_name = None )
@brief Print a message with a custom level.

@param level The custom level to use.
@param string The message to print.
@param func_name The name of the calling function.

Definition at line 611 of file my_disp.py.

◆ disp_print_debug()

None display_tty.src.my_disp.Disp.disp_print_debug ( self,
str string = "",
Union[str, None] func_name = None )
@brief Print a debug message (using logger).

@param string The message to print.
@param func_name The name of the calling function.

Definition at line 636 of file my_disp.py.

◆ disp_print_error()

None display_tty.src.my_disp.Disp.disp_print_error ( self,
str string = "",
Union[str, None] func_name = None )
@brief Print an error message (using logger).

@param string The message to print.
@param func_name The name of the calling function.

Definition at line 682 of file my_disp.py.

◆ disp_print_info()

None display_tty.src.my_disp.Disp.disp_print_info ( self,
str string = "",
Union[str, None] func_name = None )
@brief Print an information message (using logger).

@param string The message to print.
@param func_name The name of the calling function.

Definition at line 652 of file my_disp.py.

◆ disp_print_warning()

None display_tty.src.my_disp.Disp.disp_print_warning ( self,
str string = "",
Union[str, None] func_name = None )
@brief Print a warning message (using logger).

@param string The message to print.
@param func_name The name of the calling function.

Definition at line 667 of file my_disp.py.

◆ disp_round_message_box()

None display_tty.src.my_disp.Disp.disp_round_message_box ( self,
str msg = "Sample text" )
@brief Display a message in a rounded box.

@param msg The message to display.

@note The text is displayed in the center of the box, it is just difficult to show that in a function comment.\n
@note This is a sample box (characters and dimensions depend on the provided configuration):\n
@example ╔══════════════════════╗\n
@example ║      Sample text     ║\n
@example ╚══════════════════════╝\n

Definition at line 974 of file my_disp.py.

◆ disp_vertical_message_box()

None display_tty.src.my_disp.Disp.disp_vertical_message_box ( self,
str msg,
str character = '' )
@brief Display a message in a box with vertical bars.

@param msg The message to display.
@param character The character to use for the box.
@note The text is displayed in the center of the box, it is just difficult to show that in a function comment.\n
@note This is a sample box (characters and dimensions depend on the provided configuration):\n
@example ###############\n
@example #             #\n
@example #             #\n
@example #             #\n
@example # Sample text #\n
@example #             #\n
@example #             #\n
@example #             #\n
@example ###############

Definition at line 1231 of file my_disp.py.

◆ display_animation()

None display_tty.src.my_disp.Disp.display_animation ( self,
str message = "Hello World!",
float delay = 0.02 )
@brief Print the message letter by letter while applying a provided delay.

@param message The message to display.
@param delay The delay between each letter.

Definition at line 885 of file my_disp.py.

◆ error_message()

None display_tty.src.my_disp.Disp.error_message ( self,
Union[str, list] message )
@brief Print a beautified error message.

@param message The error message to display.
@note This function displays the provided message using the 'MESSAGE_CHARACTER' key in the toml configuration\n
@note Here is an example for the output (This is determined by the key repeated twice)\n
@example ## This is an example message ##

Definition at line 1459 of file my_disp.py.

◆ get_generated_content()

str display_tty.src.my_disp.Disp.get_generated_content ( self)
@brief Return the generated string.

@return The generated content.

Definition at line 817 of file my_disp.py.

◆ inform_message()

None display_tty.src.my_disp.Disp.inform_message ( self,
Union[str, List] message )
@brief Print a beautified information message.

@param message The information message to display.
@note This function displays the provided message using the 'MESSAGE_CHARACTER' key in the toml configuration\n
@note Here is an example for the output (This is determined by the key repeated twice)\n
@example ii This is an example message ii

Definition at line 1567 of file my_disp.py.

◆ log_critical()

None display_tty.src.my_disp.Disp.log_critical ( self,
str string = "",
Union[str, None] func_name = None )
@brief Log a critical message.

@param string The message to log.
@param func_name The name of the calling function.

Definition at line 788 of file my_disp.py.

◆ log_custom_level()

None display_tty.src.my_disp.Disp.log_custom_level ( self,
Union[int, str] level,
str string,
Union[str, None] func_name = None )
@brief Log a message with a custom level.

@param level The custom level to use.
@param string The message to log.
@param func_name The name of the calling function.

Definition at line 712 of file my_disp.py.

◆ log_debug()

None display_tty.src.my_disp.Disp.log_debug ( self,
str string = "",
Union[str, None] func_name = None )
@brief Log a debug message.

@param string The message to log.
@param func_name The name of the calling function.

Definition at line 728 of file my_disp.py.

◆ log_error()

None display_tty.src.my_disp.Disp.log_error ( self,
str string = "",
Union[str, None] func_name = None )
@brief Log an error message.

@param string The message to log.
@param func_name The name of the calling function.

Definition at line 773 of file my_disp.py.

◆ log_info()

None display_tty.src.my_disp.Disp.log_info ( self,
str string = "",
Union[str, None] func_name = None )
@brief Log an info message.

@param string The message to log.
@param func_name The name of the calling function.

Definition at line 743 of file my_disp.py.

◆ log_warning()

None display_tty.src.my_disp.Disp.log_warning ( self,
str string = "",
Union[str, None] func_name = None )
@brief Log a warning message.

@param string The message to log.
@param func_name The name of the calling function.

Definition at line 758 of file my_disp.py.

◆ message()

None display_tty.src.my_disp.Disp.message ( self,
Union[str, list] message )
@brief Print a beautified message.

@param message The message to display.
@note This function displays the provided message using the 'MESSAGE_CHARACTER' key in the toml configuration\n
@note Here is an example for the output (This is determined by the key repeated twice)\n
@example @@ This is an example message @@

Definition at line 1434 of file my_disp.py.

◆ question_message()

None display_tty.src.my_disp.Disp.question_message ( self,
Union[str, list] message )
@brief Print a beautified question message.

@param message The question message to display.
@note This function displays the provided message using the 'MESSAGE_CHARACTER' key in the toml configuration\n
@note Here is an example for the output (This is determined by the key repeated twice)\n
@example ?? This is an example message ??

Definition at line 1540 of file my_disp.py.

◆ sub_sub_title()

None display_tty.src.my_disp.Disp.sub_sub_title ( self,
str sub_sub_title )
@brief Print a beautified sub-subtitle.

@param sub_sub_title The sub-subtitle to display.

Definition at line 1426 of file my_disp.py.

◆ sub_title()

None display_tty.src.my_disp.Disp.sub_title ( self,
str sub_title )
@brief Print a beautified subtitle.

@param sub_title The subtitle to display.

Definition at line 1418 of file my_disp.py.

◆ success_message()

None display_tty.src.my_disp.Disp.success_message ( self,
Union[str, list] message )
@brief Print a beautified success message.

@param message The success message to display.
@note This function displays the provided message using the 'MESSAGE_CHARACTER' key in the toml configuration\n
@note Here is an example for the output (This is determined by the key repeated twice)\n
@example // This is an example message //

Definition at line 1486 of file my_disp.py.

◆ test_the_class()

None display_tty.src.my_disp.Disp.test_the_class ( self)
@brief Test function to ensure all implemented methods work as expected.

Definition at line 1706 of file my_disp.py.

◆ title()

None display_tty.src.my_disp.Disp.title ( self,
str title )
@brief Print a beautified title.

@param title The title to display.

Definition at line 1410 of file my_disp.py.

◆ tree()

Union[str, None] display_tty.src.my_disp.Disp.tree ( self,
str title,
List[str] data,
int offset = 0 )
@brief Print a list under the form of a beautified tree.

@param title The title of the tree.
@param data The data to display in the tree.
@param offset The offset for the tree.
@note The characters displayed in this tree function is managed by the following keys:\n
@note     * TREE_NODE_CHAR\n
@note     * TREE_NODE_END_CHAR\n
@note     * TREE_LINE_SEPERATOR_CHAR\n
@note     * TREE_COLUMN_SEPERATOR_CHAR\n
@example     Here is an example generated by this function:\n
@example     ├─── data1\n
@example     └─── data2
@return A stringified version of the tree if not set to be displayed.

Definition at line 1628 of file my_disp.py.

◆ update_disp_debug()

None display_tty.src.my_disp.Disp.update_disp_debug ( self,
bool debug )
@brief Update the debug mode.

@param debug Boolean indicating whether debug mode is enabled.

Definition at line 181 of file my_disp.py.

◆ update_logger_level()

None display_tty.src.my_disp.Disp.update_logger_level ( self,
Union[int, LogLevelTracker.Levels] level = LogLevelTracker.Levels.NOTSET )
@brief Update the logger level.

@param level The log importance level. Defaults to NOTSET.

@return The status code of the operation.

Definition at line 189 of file my_disp.py.

◆ update_logging_colour_background()

int display_tty.src.my_disp.Disp.update_logging_colour_background ( self,
Union[str, int] colour,
Union[str, int] level_name,
logging.Logger logger_instance = None )
@brief Update or insert a logging colour for the background of the specified level.

@param colour The colour to use (string or number).
@param level_name The level name or number.
@param logger_instance The logger instance to update.
@return The status code of the operation.

Definition at line 415 of file my_disp.py.

◆ update_logging_colour_text()

int display_tty.src.my_disp.Disp.update_logging_colour_text ( self,
Union[str, int] colour,
Union[str, int] level_name,
logging.Logger logger_instance = None )
@brief Update or insert a logging colour for the text of the specified level.

@param colour The colour to use (string or number).
@param level_name The level name or number.
@param logger_instance The logger instance to update.
@return The status code of the operation.

Definition at line 351 of file my_disp.py.

◆ warning_message()

None display_tty.src.my_disp.Disp.warning_message ( self,
Union[str, list] message )
@brief Print a beautified warning message.

@param message The warning message to display.
@note This function displays the provided message using the 'MESSAGE_CHARACTER' key in the toml configuration\n
@note Here is an example for the output (This is determined by the key repeated twice)\n
@example !! This is an example message !!

Definition at line 1513 of file my_disp.py.

Field Documentation

◆ author

str display_tty.src.my_disp.Disp.author = "(c) Created by Henry Letellier"

Definition at line 69 of file my_disp.py.

◆ background_colour_key

display_tty.src.my_disp.Disp.background_colour_key = 'background_colour'

Definition at line 68 of file my_disp.py.

◆ debug [1/2]

bool display_tty.src.my_disp.Disp.debug = debug

Definition at line 71 of file my_disp.py.

◆ debug [2/2]

int display_tty.src.my_disp.Disp.debug = 2

Definition at line 1774 of file my_disp.py.

◆ error

display_tty.src.my_disp.Disp.error = error

Definition at line 72 of file my_disp.py.

◆ file_descriptor

display_tty.src.my_disp.Disp.file_descriptor = file_descriptor

Definition at line 100 of file my_disp.py.

◆ file_name

display_tty.src.my_disp.Disp.file_name = file_name

Definition at line 96 of file my_disp.py.

◆ generated_content

str display_tty.src.my_disp.Disp.generated_content = ""

Definition at line 101 of file my_disp.py.

◆ log_error_when_present

display_tty.src.my_disp.Disp.log_error_when_present = log_errors_when_present

Definition at line 75 of file my_disp.py.

◆ log_level_tracker [1/2]

display_tty.src.my_disp.Disp.log_level_tracker = LogLevelTracker()

Definition at line 77 of file my_disp.py.

◆ log_level_tracker [2/2]

str display_tty.src.my_disp.Disp.log_level_tracker = "" or colour_text < 0:

Definition at line 529 of file my_disp.py.

◆ log_warning_when_present

display_tty.src.my_disp.Disp.log_warning_when_present = log_warning_when_present

Definition at line 76 of file my_disp.py.

◆ logger

display_tty.src.my_disp.Disp.logger = logger

Definition at line 118 of file my_disp.py.

◆ max_whitespace

int display_tty.src.my_disp.Disp.max_whitespace = self.nb_chr - self.nb_side_walls

Definition at line 78 of file my_disp.py.

◆ message_animation_delay

display_tty.src.my_disp.Disp.message_animation_delay = self.toml_content[KEY_ANIMATION_DELAY_BLOCKY]

Definition at line 89 of file my_disp.py.

◆ message_char

display_tty.src.my_disp.Disp.message_char = self.toml_content["MESSAGE_CHARACTER"]

Definition at line 82 of file my_disp.py.

◆ message_error_char

display_tty.src.my_disp.Disp.message_error_char = self.toml_content["MESSAGE_ERROR_CHARACTER"]

Definition at line 83 of file my_disp.py.

◆ message_inform_char

display_tty.src.my_disp.Disp.message_inform_char = self.toml_content["MESSAGE_INFORM_CHARACTER"]

Definition at line 85 of file my_disp.py.

◆ message_question_char

display_tty.src.my_disp.Disp.message_question_char = self.toml_content["MESSAGE_QUESTION_CHARACTER"]

Definition at line 87 of file my_disp.py.

◆ message_success_char

display_tty.src.my_disp.Disp.message_success_char = self.toml_content["MESSAGE_SUCCESS_CHARACTER"]

Definition at line 84 of file my_disp.py.

◆ message_warning_char

display_tty.src.my_disp.Disp.message_warning_char = self.toml_content["MESSAGE_WARNING_CHARACTER"]

Definition at line 86 of file my_disp.py.

◆ nb_chr

int display_tty.src.my_disp.Disp.nb_chr = 40

Definition at line 70 of file my_disp.py.

◆ nb_side_walls

int display_tty.src.my_disp.Disp.nb_side_walls = 2

Definition at line 74 of file my_disp.py.

◆ save_to_file

bool display_tty.src.my_disp.Disp.save_to_file = save_to_file

Definition at line 97 of file my_disp.py.

◆ sub_sub_title_wall_chr

display_tty.src.my_disp.Disp.sub_sub_title_wall_chr = self.toml_content["SUB_SUB_TITLE_WALL_CHARACTER"]

Definition at line 81 of file my_disp.py.

◆ sub_title_wall_chr

display_tty.src.my_disp.Disp.sub_title_wall_chr = self.toml_content["SUB_TITLE_WALL_CHARACTER"]

Definition at line 80 of file my_disp.py.

◆ success

display_tty.src.my_disp.Disp.success = success

Definition at line 73 of file my_disp.py.

◆ title_wall_chr

display_tty.src.my_disp.Disp.title_wall_chr = self.toml_content["TITLE_WALL_CHARACTER"]

Definition at line 79 of file my_disp.py.

◆ toml_content [1/2]

str display_tty.src.my_disp.Disp.toml_content = toml_content

Definition at line 67 of file my_disp.py.

◆ toml_content [2/2]

str display_tty.src.my_disp.Disp.toml_content
Initial value:
= self.create_string(
self.nb_chr - offset_reset,
self.toml_content['ROUND_BOX_HORIZONTAL']
)

Definition at line 1000 of file my_disp.py.

◆ tree_column_seperator_char

display_tty.src.my_disp.Disp.tree_column_seperator_char = self.toml_content["TREE_COLUMN_SEPERATOR_CHAR"]

Definition at line 95 of file my_disp.py.

◆ tree_line_seperator_char

display_tty.src.my_disp.Disp.tree_line_seperator_char = self.toml_content["TREE_LINE_SEPERATOR_CHAR"]

Definition at line 94 of file my_disp.py.

◆ tree_node_char

display_tty.src.my_disp.Disp.tree_node_char = self.toml_content["TREE_NODE_CHAR"]

Definition at line 92 of file my_disp.py.

◆ tree_node_end_char

display_tty.src.my_disp.Disp.tree_node_end_char = self.toml_content["TREE_NODE_END_CHAR"]

Definition at line 93 of file my_disp.py.


The documentation for this class was generated from the following file: