当前位置: 首页>>代码示例>>Python>>正文


Python color.red方法代码示例

本文整理汇总了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 
开发者ID:Scemoon,项目名称:lpts,代码行数:25,代码来源:line_style.py

示例2: error

# 需要导入模块: import color [as 别名]
# 或者: from color import red [as 别名]
def error(word):
        Log._print("[-] %s\n" % color.red(word)) 
开发者ID:WangYihang,项目名称:Exploit-Framework,代码行数:4,代码来源:Log.py

示例3: context

# 需要导入模块: import color [as 别名]
# 或者: from color import red [as 别名]
def context(context):
        Log._print("[%s]" % (color.red(context))) 
开发者ID:WangYihang,项目名称:Exploit-Framework,代码行数:4,代码来源:Log.py

示例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')) 
开发者ID:reorx,项目名称:python-terminal-color,代码行数:8,代码来源:notty_test.py

示例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')) 
开发者ID:reorx,项目名称:python-terminal-color,代码行数:7,代码来源:color_test.py

示例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')) 
开发者ID:reorx,项目名称:python-terminal-color,代码行数:8,代码来源:color_test.py

示例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)] 
开发者ID:Scemoon,项目名称:lpts,代码行数:11,代码来源:rose_plot.py

示例8: print_err

# 需要导入模块: import color [as 别名]
# 或者: from color import red [as 别名]
def print_err(msg):
    pykd.dprintln(color.red(msg), dml=True) 
开发者ID:bruce30262,项目名称:TWindbg,代码行数:4,代码来源:utils.py

示例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)) 
开发者ID:bruce30262,项目名称:TWindbg,代码行数:13,代码来源:context.py

示例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("") 
开发者ID:bruce30262,项目名称:TWindbg,代码行数:15,代码来源:context.py


注:本文中的color.red方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。