LineTerminal¶
- class pyTooling.TerminalUI.LineTerminal(verbose=False, debug=False, quiet=False, writeToStdOut=True)[source]¶
Bases:
Terminal
,ILineTerminal
- _LOG_MESSAGE_FORMAT__ = {Severity.Debug: '{DARK_GRAY}{message}{NOCOLOR}', Severity.Verbose: '{GRAY}{message}{NOCOLOR}', Severity.Normal: '{WHITE}{message}{NOCOLOR}', Severity.DryRun: '{DARK_CYAN}[DRY] {message}{NOCOLOR}', Severity.Info: '{WHITE}{message}{NOCOLOR}', Severity.Warning: '{YELLOW}[WARNING]{message}{NOCOLOR}', Severity.Quiet: '{WHITE}{message}{NOCOLOR}', Severity.Error: '{RED}[ERROR] {message}{NOCOLOR}', Severity.Fatal: '{DARK_RED}[FATAL] {message}{NOCOLOR}'}¶
Message formatting rules.
- WriteLine(line)[source]¶
Print a formatted line to the underlying terminal/console offered by the operating system.
- WriteFatal(message, indent=0, appendLinebreak=True, immediateExit=True)[source]¶
Write a fatal message if
condition
is true.
- WriteError(message, indent=0, appendLinebreak=True)[source]¶
Write an error message if
condition
is true.
- WriteWarning(message, indent=0, appendLinebreak=True)[source]¶
Write a warning message if
condition
is true.
- WriteInfo(message, indent=0, appendLinebreak=True)[source]¶
Write a info message if
condition
is true.
- WriteQuiet(message, indent=0, appendLinebreak=True)[source]¶
Write a message even in quiet mode if
condition
is true.
- WriteNormal(message, indent=0, appendLinebreak=True)[source]¶
Write a normal message if
condition
is true.
- WriteVerbose(message, indent=1, appendLinebreak=True)[source]¶
Write a verbose message if
condition
is true.