Skip to content

Instantly share code, notes, and snippets.

@philippeowagner
Created June 16, 2016 07:12
Show Gist options
  • Save philippeowagner/2664ff44ee48c04ccdab26fd8450006e to your computer and use it in GitHub Desktop.
Save philippeowagner/2664ff44ee48c04ccdab26fd8450006e to your computer and use it in GitHub Desktop.
Terminal Colors for Python
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
# example:
print bcolors.FAIL + "FAILED!" + bcolors.ENDC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment