本文整理匯總了Python中color.red方法的典型用法代碼示例。如果您正苦於以下問題:Python color.red方法的具體用法?Python color.red怎麽用?Python color.red使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類color
的用法示例。
在下文中一共展示了color.red方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: init
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def init():
global standards, _name_table
standards = object_set.T()
if theme.use_color:
standards.add(black, red, darkblue, gray70, darkseagreen,
darkkhaki, gray30,
black_dash1, red_dash1, darkblue_dash1, gray70_dash1,
darkseagreen_dash1, darkkhaki_dash1, gray30_dash1,
black_dash2, red_dash2, darkblue_dash2, gray70_dash2,
darkseagreen_dash2, darkkhaki_dash2, gray30_dash2)
else:
standards.add(black, black_dash1, black_dash2,
gray70, gray70_dash1, gray70_dash2,
gray10, gray10_dash1, gray10_dash2,
gray50, gray50_dash1, gray50_dash2,
gray90, gray90_dash1, gray90_dash2,
gray30, gray30_dash1, gray30_dash2,
black_dash3,
gray70_dash3, gray10_dash3, gray50_dash3, gray90_dash3)
for style in standards.list():
style.width = theme.default_line_width
_name_table = None
示例2: error
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def error(word):
Log._print("[-] %s\n" % color.red(word))
示例3: context
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def context(context):
Log._print("[%s]" % (color.red(context)))
示例4: test_notty
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def test_notty():
"""
Run `nosetests -vs test/notty_test.py | less` to see red is not red
"""
color.use_color_no_tty(False)
print(color.red('red'))
示例5: test_named_colors
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def test_named_colors():
for i in color_names:
print(getattr(color, i)(i) + color.red('compare'))
print(color.black(getattr(color, i + '_bg')(i + '_bg')) + color.red('compare'))
print(getattr(color, i + '_hl')(i + '_hl') + color.red('compare'))
示例6: test_decorations
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def test_decorations():
for i in ['bold', 'italic', 'underline', 'strike', 'blink']:
print('#' + i)
for j in color_names:
c = getattr(color, j)(j)
print(getattr(color, i)(c) + color.red('compare'))
示例7: __init__
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def __init__(self, colour=True, **args):
chart_object.T.init(self, args)
if colour:
# the theme.color flag does not seem to affect the fill_style.standards,
#besides, I want the first two colors to resemble those of gnuplot's postscript terminal
self.fill_styles = [fill_style.Plain(bgcolor=color.red),
fill_style.Plain(bgcolor=color.green),
fill_style.Plain(bgcolor=color.blue),
fill_style.Plain(bgcolor=color.magenta)]
示例8: print_err
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def print_err(msg):
pykd.dprintln(color.red(msg), dml=True)
示例9: print_general_regs
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def print_general_regs(self):
for reg_name in self.context.regs_name:
reg_data = self.context.regs[reg_name]
reg_str = '{:3}: '.format(reg_name.upper())
reg_color = self.set_reg_color(reg_name, color_changed=color.red, color_unchanged=color.lime)
pykd.dprint(reg_color(reg_str), dml=True)
if pykd.isValid(reg_data): # reg_data is a pointer
self.print_ptrs(reg_data)
else:
pykd.dprintln("{:#x}".format(reg_data))
示例10: print_seg_regs
# 需要導入模塊: import color [as 別名]
# 或者: from color import red [as 別名]
def print_seg_regs(self):
first_print = True
for reg_name in self.context.seg_regs_name:
reg_data = self.context.regs[reg_name]
reg_str = '{:2}={:#x}'.format(reg_name.upper(), reg_data)
reg_color = self.set_reg_color(reg_name, color_changed=color.red, color_unchanged=color.green)
if first_print:
pykd.dprint(reg_color(reg_str), dml=True)
first_print = False
else:
pykd.dprint(" | " + reg_color(reg_str), dml=True)
pykd.dprintln("")