예제 #1
0
파일: tests.py 프로젝트: brunobord/colorize
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')
예제 #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')
예제 #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
예제 #4
0
 def __init__(self):
     self.style = color_style()
예제 #5
0
 def __init__(self):
     self.style = color_style( )
예제 #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