Skip to content

Instantly share code, notes, and snippets.

@mdeous
Created January 5, 2014 15:45
Show Gist options
  • Save mdeous/8269788 to your computer and use it in GitHub Desktop.
Save mdeous/8269788 to your computer and use it in GitHub Desktop.
Python Shell Output Color
COLOR_CODES = {
'green': '\033[32m',
'bgreen': '\033[1;32m',
'bgrey': '\033[1;30m',
'reset': '\033[0m'
}
def color(text, color_name):
return COLOR_CODES[color_name]+text+COLOR_CODES['reset']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment