bash_colors#
- class cosmicjellyfish.analysis.colors.bash_colors[source]#
Bases:
objectThis class contains the necessary definitions to print to bash screen with colors. Sometimes it can be useful and nice! :ivar HEADER: ANSI color for light purple. :ivar OKBLUE: ANSI color for blue. :ivar OKGREEN: ANSI color for green. :ivar WARNING: ANSI color for yellow. :ivar FAIL: ANSI color for red. :ivar BOLD: ANSI code for bold text. :ivar UNDERLINE: ANSI code for underlined text. :ivar ENDC: ANSI code to restore the bash default.
- HEADER = '\x1b[95m'#
ANSI color for light purple.
- OKBLUE = '\x1b[94m'#
ANSI color for blue.
- OKGREEN = '\x1b[92m'#
ANSI color for green.
- WARNING = '\x1b[93m'#
ANSI color for yellow.
- FAIL = '\x1b[91m'#
ANSI color for red.
- BOLD = '\x1b[1m'#
ANSI code for bold text.
- UNDERLINE = '\x1b[4m'#
ANSI code for underlined text.
- ENDC = '\x1b[0m'#
ANSI code to restore the bash default.
- header(string)[source]#
Function that returns a string that can be printed to bash in
cosmicfish_pylib.colors.bash_colors.HEADERcolor.- Parameters:
string (string) – input string.
- Returns:
the input string with the relevant ANSI code at the beginning and at the end.
- Return type:
string
- blue(string)[source]#
Function that returns a string that can be printed to bash in
cosmicfish_pylib.colors.bash_colors.OKBLUEcolor.- Parameters:
string (string) – input string.
- Returns:
the input string with the relevant ANSI code at the beginning and at the end.
- Return type:
string
- green(string)[source]#
Function that returns a string that can be printed to bash in
cosmicfish_pylib.colors.bash_colors.OKGREENcolor.- Parameters:
string (string) – input string.
- Returns:
the input string with the relevant ANSI code at the beginning and at the end.
- Return type:
string
- warning(string)[source]#
Function that returns a string that can be printed to bash in
cosmicfish_pylib.colors.bash_colors.WARNINGcolor.- Parameters:
string (string) – input string.
- Returns:
the input string with the relevant ANSI code at the beginning and at the end.
- Return type:
string
- fail(string)[source]#
Function that returns a string that can be printed to bash in
cosmicfish_pylib.colors.bash_colors.FAILcolor.- Parameters:
string (string) – input string.
- Returns:
the input string with the relevant ANSI code at the beginning and at the end.
- Return type:
string