color the python console text

zyip發表於2015-03-09

 

 

//install termcolor module
cd \
cd python27
cd scripts
pip install termcolor
pip install colorama


//python scripts for testing
from termcolor import colored
print(colored("Hello world in red style!", 'red'))


>>> from termcolor import *
>>> import colorama
>>> colorama.init()
>>> cprint('hello', 'red')

 

相關文章