传入 msg , 返回 True/False

    :param separator:
    :type separator:
    :param fg_color:
    :type fg_color:
    :param indent:
    :type indent:
    :param msg:
    :type msg:
    :return:
    :rtype:
541255
def yn_choice(msg, indent=4, fg_color='cyan', separator=''):
    
    _header, _footer = gen_separator(separator=separator)
    if _header:
        textui.puts(getattr(textui.colored, fg_color)(_header))
    with textui.indent(indent, quote=' {}'.format(' ')):
        textui.puts(textui.colored.green(msg))
    if _footer:
        textui.puts(getattr(textui.colored, fg_color)(_footer))

    c = click.confirm(
        click.style('Your Choice?[yn] (q-quit/b-back)?', fg='cyan'),
        default=True,
    )
    return c
1182018
def say(msg, sym='...', loud=false, indent=0)
    return false if Conf[:quiet]
    return false if loud && !Conf[:verbose]
    unless msg == ''
      time = ""
      if Conf[:timed]
        time = Timer.time.to_s.ljust(4, '0')
        time = time + " "
      end
      indent = "    " * indent
      indent = " " if indent == ""
      puts "#{time}#{sym}#{indent}#{msg}"
    else
      puts
    end
  end
855006
def _color_im_callback(self, msg):
        
        try:
            data = self._bridge.imgmsg_to_cv2(msg)
            if np.max(data) > 255.0:
                data = 255.0 * data / 1200.0 # Experimentally set value for white
            data = np.clip(data, 0., 255.0).astype(np.uint8)
            gsimage = GrayscaleImage(data, frame=self._frame)
            self._cur_color_im = gsimage.to_color()
        except:
            self._cur_color_im = None
1044953
def msg_err(message):
    
    to_stdout(" !!! {message}".format(message=message), colorf=red, bold=True)
    if _logger:
        _logger.error(message)
1020069
def info(self, msg, indent=0, **kwargs):
        """"""
        return self.logger.info(self._indent(msg, indent), **kwargs)
1174035
function formatMessage(message, parentResult) {
    const type = (message.fatal || message.severity === 2) ? chalk.red("error") : chalk.yellow("warning");
    const msg = `${chalk.bold(message.message.replace(/([^ ])\.$/u, "$1"))}`;
    const ruleId = message.fatal ? "" : chalk.dim(`(${message.ruleId})`);
    const filePath = formatFilePath(parentResult.filePath, message.line, message.column);
    const sourceCode = parentResult.output ? parentResult.output : parentResult.source;

    const firstLine = [
        `${type}:`,
        `${msg}`,
        ruleId ? `${ruleId}` : "",
        sourceCode ? `at ${filePath}:` : `at ${filePath}`
    ].filter(String).join(" ");

    const result = [firstLine];

    if (sourceCode) {
        result.push(
            codeFrameColumns(sourceCode, { start: { line: message.line, column: message.column } }, { highlightCode: false })
        );
    }

    return result.join("\n");
}
473582
function print(type, msg, obj, colors) {
  if (typeof type === 'number') {
    type = calculateLevel(type);
  }
  const finalMessage = fillInMsgTemplate(msg, obj, colors);

  const subsystems = [
    {
      in: green('<--'),
      out: yellow('-->'),
      fs: black('-=-'),
      default: blue('---'),
    },
    {
      in: '<--',
      out: '-->',
      fs: '-=-',
      default: '---',
    },
  ];

  const sub = subsystems[colors ? 0 : 1][obj.sub] || subsystems[+!colors].default;
  if (colors) {
    return ` ${levels[type](pad(type))}${white(`${sub} ${finalMessage}`)}`;
  } else {
    return ` ${pad(type)}${sub} ${finalMessage}`;
  }
}
658049
def colorlog(msg, color, bold=False, blink=False):
    """"""

    # ANSI Escape Codes
    PINK_COL = '\x1b[35m'
    GREEN_COL = '\x1b[32m'
    RED_COL = '\x1b[31m'
    YELLOW_COL = '\x1b[33m'
    BLINK = '\x1b[5m'
    RESET = '\x1b[0m'

    if platform.system() != 'Windows':
        if blink:
            msg = BLINK + msg + RESET
        if color == 'yellow':
            msg = YELLOW_COL + msg + RESET
        if color == 'red':
            msg = RED_COL + msg + RESET
        if color == 'green':
            msg = GREEN_COL + msg + RESET
        if color == 'pink':
            msg = PINK_COL + msg + RESET
    return msg
401096
def _header(self, message: str, with_gap=True):
        
        if with_gap:
            self._line_break()
        self._log(self._set_color(message, self.YELLOW))
367997
private void drawSeparator(Separator sep)
    {
        final Color color = sep.isHorizontal() ? Color.BLUE : Color.RED;
        browser.getOutputDisplay().drawRectangle(sep, color);
    }
177694
public void setSeparatorColor(int separatorColor) {
        mSeparatorColor = separatorColor;

        Field[] pickerFields = NumberPicker.class.getDeclaredFields();
        for (Field pf : pickerFields) {
            if (pf.getName().equals("mSelectionDivider")) {
                pf.setAccessible(true);
                try {
                    pf.set(this, new ColorDrawable(separatorColor));
                } catch (IllegalAccessException | IllegalArgumentException e) {
                    e.printStackTrace();
                }
                break;
            }
        }
    }
151876
def std_formatter(msg):
    

    if isinstance(msg, dict):
        return yaml.safe_dump(msg, indent=True, default_flow_style=False)
    return str(msg)
246844
def format(message, colour = nil, style = nil)
      c = @map[:colour][colour.to_sym] unless colour.nil?

      if style.nil?
        t = 0
      else
        t = @map[:style][style.to_sym]
      end

      "\e[#{t};#{c}m#{message}\e[0m"
    end
1190074
def say msg, *styles
      self.write((color?? process(msg, *styles) : unstyle(msg)) + "\n") ; nil
    end
863366
def _color(self, color, msg):
        
        if self.useColor:
            return '{0}{1}{2}'.format(color, msg, self.RESET_SEQ)
        else:
            return msg
1021780
def _strip_colors(self, message: str) -> str:
        
        for c in self.COLORS:
            message = message.replace(c, "")
        return message
285336
def separator_color(self, value):
        

        if value is not None:
            assert type(value) is QColor, "'{0}' attribute: '{1}' type is not 'QColor'!".format(
                "separator_color", value)
        self.__separator_color = value