Friday, September 25, 2009

Everybody Loves Colors

Colors on terminal scripts are fun. They're also easy.
class Colors:
ESC = "\033["
PURPLE = ESC + "95m"
GREEN = ESC + "92m"
YELLOW = ESC + "93m"
RESET = ESC + "0m"

print Colors.YELLOW + "Warning: Colors enabled."
print Colors.RESET

No comments:

Post a Comment