Example #1
0
def test_colors():
    style = color.color_style()
    style.ERROR = termcolors.make_style(fg='red', opts=('bold',))
    style.INFO = termcolors.make_style(fg='blue')
    style.OK = termcolors.make_style(fg='green')
    style.WARNING = termcolors.make_style(fg='yellow')

    print style.ERROR('I am red and bold')
    print style.INFO('I am blue')
    print style.OK('I am green')
    print style.WARNING('I am yellow')
Example #2
0
#!/usr/bin/python
#-*- coding:utf-8 -*-

import color

style = color.color_style()

print style.ERROR('it is error')
print style.NOTICE('it is notice')
Example #3
0
 def __init__(self, argv=None):
     self.argv = argv or sys.argv[:]
     self.prog_name = os.path.basename(self.argv[0])
     self.style = color_style( )
     self.version = None
Example #4
0
 def __init__(self):
     self.style = color_style()
Example #5
0
 def __init__(self):
     self.style = color_style( )
Example #6
0
 def __init__(self, argv=None):
     self.argv = argv or sys.argv[:]
     self.prog_name = os.path.basename(self.argv[0])
     self.style = color_style()
     self.version = None