Skip to content

Instantly share code, notes, and snippets.

@wynsmart
Created January 18, 2017 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wynsmart/70d0002221adbcb4c7871709a7654a2e to your computer and use it in GitHub Desktop.
Save wynsmart/70d0002221adbcb4c7871709a7654a2e to your computer and use it in GitHub Desktop.
colored terminal prints
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'
# To use code like this, you can do something like
print("{}Warning: No active frommets remain. Continue?{}".format(bcolors.WARNING, bcolors.ENDC)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment