Skip to content

Instantly share code, notes, and snippets.

@itkr
Created June 11, 2015 03:39
Show Gist options
  • Save itkr/35ff561d4e9d8c84e13a to your computer and use it in GitHub Desktop.
Save itkr/35ff561d4e9d8c84e13a to your computer and use it in GitHub Desktop.
echo.py
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