Created
June 11, 2015 03:39
-
-
Save itkr/35ff561d4e9d8c84e13a to your computer and use it in GitHub Desktop.
echo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def echo(message, message_type=None): | |
colors = { | |
"OK": '\033[94m', | |
"SUCCESS": '\033[92m', | |
"WARNING": '\033[93m', | |
"FAIL": '\033[91m', | |
} | |
color = colors.get(message_type) | |
print "".join([color, message, '\033[0m']) if color else message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment