YAPM.Terminal

Add many things for Terminal printing

class YAPM.Terminal.Terminal(TrueColor=True)

A Class for more terminal customisation. Including printing with custom colors.

Parameters:

TrueColor=True (bool) – Does this terminal support true color

print(fore: tuple | None = None, back: tuple | None = None, *text, start_ansi: list[str] = [], end_ansi: list[str] = [], sep: str = ' ', end: str = '\x1b[0m\n', bold: bool = False, italic: bool = False, line: bool = False, strike: bool = False)

Prints text with a given color

Parameters:
  • fore (Tuple[int 0-255 * 3] | None) – The foreground of the text. White if None

  • back (Tuple[int 0-255 * 3] | None) – The background of the text. Black if None

  • text (*str) – text to print, seperated by sep

  • start_ansi (str) – Ansi codes to add before the text. Goes after the ansi color code. Automaticly adds ESC

  • end_ansi (str) – Same as start_ansi but after the text. before end

  • " (str sep=") – The seperator to add between text

  • end="RESETn" (str) – What to add at the end of the text. If changed add reset or text will stay colored

  • bold=False (bool) – Should the text be bold.

  • italic=False (bool) – Should the text be italic.

  • line=False (bool) – Should the text have a underline.

  • strike=False (bool) – Should the text have a strikethrough.

Returns:

None

Rasies ValueError:

One or more of the arguments are the wrong type