This class contains the necessary definitions to print to bash
screen with colors. Sometimes it can be useful...
Source code in brahmap/utilities/tools.py
| class bash_colors:
"""
This class contains the necessary definitions to print to bash
screen with colors. Sometimes it can be useful...
"""
HEADER = "\033[95m"
OKBLUE = "\033[94m"
OKGREEN = "\033[92m"
WARNING = "\033[93m"
FAIL = "\033[91m"
ENDC = "\033[0m"
BOLD = "\033[1m"
UNDERLINE = "\033[4m"
def header(self, string):
return self.HEADER + str(string) + self.ENDC
def blue(self, string):
return self.OKBLUE + str(string) + self.ENDC
def green(self, string):
return self.OKGREEN + str(string) + self.ENDC
def warning(self, string):
return self.WARNING + str(string) + self.ENDC
def fail(self, string):
return self.FAIL + str(string) + self.ENDC
def bold(self, string):
return self.BOLD + str(string) + self.ENDC
def underline(self, string):
return self.UNDERLINE + str(string) + self.ENDC
|