From 122aeee92b91c4d877719d75da77dad29b6dd16b Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 14 Mar 2011 23:09:07 -0400 Subject: [PATCH] colorama wrapper, nice and simple. --- clint/colored.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 clint/colored.py diff --git a/clint/colored.py b/clint/colored.py new file mode 100644 index 0000000..c466ad7 --- /dev/null +++ b/clint/colored.py @@ -0,0 +1,31 @@ +from clint.packages import colorama + +""" +Simple colorama wrapper +""" + +colorama.init(autoreset=True) + +def black(string): + return '%s%s' % (colorama.Fore.BLACK, string) + +def red(string): + return '%s%s' % (colorama.Fore.RED, string) + +def green(string): + return '%s%s' % (colorama.Fore.GREEN, string) + +def yellow(string): + return '%s%s' % (colorama.Fore.YELLOW, string) + +def blue(string): + return '%s%s' % (colorama.Fore.BLUE, string) + +def magenta(string): + return '%s%s' % (colorama.Fore.MAGENTA, string) + +def cyan(string): + return '%s%s' % (colorama.Fore.CYAN, string) + +def white(string): + return '%s%s' % (colorama.Fore.WHITE, string)