Colour prints

This commit is contained in:
Artur Meski
2017-11-05 17:51:04 +00:00
parent 81b1ab4507
commit f7097e37d7

View File

@@ -13,7 +13,16 @@ C_MARK_ERROR = C_BOLD + "[" + C_RED + "!" + C_ENDC + C_BOLD + "]" + C_ENDC
def colour_str(col, s):
return col + s + C_ENDC
def green_str(s):
return C_GREEN + s + C_ENDC
def print_error(s):
print(C_MARK_ERROR + " " + C_RED + s + C_ENDC)
def print_info(s):
print("[" + colour_str(C_BOLD, "i") + "] {:s}".format(s))
def print_positive(s):
print("[" + colour_str(C_BOLD, "+") + "] {:s}".format(s))
# EOF