Created
January 5, 2014 15:45
-
-
Save mdeous/8269788 to your computer and use it in GitHub Desktop.
Python Shell Output Color
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
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