Format for printing.
332373
public void format(StringBuffer fmt, Set done, Set todo, int indent) {
    formatName(fmt, indent);
    fmt.append("Enum");
    if (enumerators != null) {
      fmt.append("{{");
      String delim = "";
      for (int i = 0; i < enumerators.length; i++) {
        fmt.append(delim).append(enumerators[i]);
        delim = ",";
      }
      fmt.append("}}");
    }
  }
1256137
def tprint(text, font=DEFAULT_FONT, chr_ignore=True):
    
    """
    result = text2art(text, font=font, chr_ignore=chr_ignore)
    print(result)
866032
def __print_table(table):
        """"""

        col_width = [max(len(x) for x in col) for col in zip(*table)]
        print("| " + " | ".join("{:{}}".format(x, col_width[i])
                                for i, x in enumerate(table[0])) + " |")
        print("| " + " | ".join("{:{}}".format('-' * col_width[i], col_width[i])
                                for i, x in enumerate(table[0])) + " |")
        for line in table[1:]:
            print("| " + " | ".join("{:{}}".format(x, col_width[i])
                                    for i, x in enumerate(line)) + " |")
1271018
def printable(data):
        
        result = ''
        for c in data:
            if 32 < ord(c) < 128:
                result += c
            else:
                result += '.'
        return result
356374
def _format_output(selected_number, raw_data):
    """"""
    tmp_data = {}
    data = collections.defaultdict(lambda: 0)
    balance = raw_data.pop('balance')
    for number in raw_data.keys():
        tmp_data = dict([(k, int(v) if v is not None else "No limit")
                         for k, v in raw_data[number].items()])
        tmp_data['number'] = number
        if selected_number is None or selected_number == number:
            data[number] = tmp_data

    output = ("""Account Balance
=======

Balance:      {:.2f} $
""")
    print(output.format(balance))
    for number_data in data.values():
        _print_number(number_data)
40750
def print_split(column_to_split, total_columns):
    """"""
    out = ""
    for _ in range(column_to_split):
        out += "| "
    out += "|\\"
    for _ in range(column_to_split + 1, total_columns):
        out += " \\"
    print(out)
1310191
def _printM(self, messages):
        """"""
        if len(messages) == 2:
            print(Style.BRIGHT + messages[0] + Style.RESET_ALL +
                  Fore.BLUE + messages[1] + Style.RESET_ALL)
        else:
            print("Not implemented")
572806
def printer(self):
        """"""
        for key in self.statediag:
            if key.trans is not None and len(key.trans) > 0:
                print '****** ' + repr(key.id) + '(' + repr(key.type)\
                      + ' on sym ' + repr(key.sym) + ') ******'
                print key.trans
1295230
def _print(self, text, color=None, **kwargs):
        
        COLORS = {
            'red': '\033[91m{}\033[00m',
            'green': '\033[92m{}\033[00m',
            'yellow': '\033[93m{}\033[00m',
            'cyan': '\033[96m{}\033[00m'
        }
        _ = COLORS[color]
        six.print_(_.format(text), **kwargs)
480679
def do_format(self, format):
        """"""
        infile = self.tmpfile
        outfile = self.basename + '.out'
        outfile_jp2 = self.basename + '.jp2'
        # Now convert finished pnm file to output format
        # simeon@ice ~>cat m3.pnm | pnmtojpeg  > m4.jpg
        # simeon@ice ~>cat m3.pnm | pnmtotiff > m4.jpg
        # pnmtotiff: computing colormap...
        # pnmtotiff: Too many colors - proceeding to write a 24-bit RGB file.
        # pnmtotiff: If you want an 8-bit palette file, try doing a 'ppmquant 256'.
        # simeon@ice ~>cat m3.pnm | pnmtopng  > m4.png
        fmt = ('png' if (format is None) else format)
        if (fmt == 'png'):
            # print "format: png"
            if (self.shell_call(self.pnmtopng + ' ' + infile + ' > ' + outfile)):
                raise IIIFError(
                    text="Oops... got nonzero output from pnmtopng.")
            mime_type = "image/png"
        elif (fmt == 'jpg'):
            # print "format: jpg"
            if (self.shell_call(self.pnmtojpeg + ' ' + infile + ' > ' + outfile)):
                raise IIIFError(
                    text="Oops... got nonzero output from pnmtojpeg.")
            mime_type = "image/jpeg"
        elif (fmt == 'tiff' or fmt == 'jp2'):
            # print "format: tiff/jp2"
            if (self.shell_call(self.pnmtotiff + ' ' + infile + ' > ' + outfile)):
                raise IIIFError(
                    text="Oops... got nonzero output from pnmtotiff.")
            mime_type = "image/tiff"
            if (fmt == 'jp2'):
                # use djatoka after tiff
                if (self.shell_call(DJATOKA_COMP + ' -i ' + outfile + ' -o ' + outfile_jp2)):
                    raise IIIFError(
                        text="Oops... got nonzero output from DJATOKA_COMP.")
                mime_type = "image/jp2"
                outfile = tmpfile_jp2
        else:
            raise IIIFError(code=415, parameter='format',
                            text="Unsupported output file format (%s), only png,jpg,tiff are supported." % (fmt))
        self.outfile = outfile
        self.output_format = fmt
        self.mime_type = mime_type
439424
def _pprint(dic):
    """"""
    for key, value in dic.items():
        print("        {0}: {1}".format(key, value))
746809
def pretty_print(q)
      q.text("AbsoluteSet[#{size}/#{@universe.size}]")
      q.group(2, "(", ")") do
        q.breakable ""

        elements = to_a
        elements.take(5).each do |e|
          unless q.current_group.first?
            q.text ","
            q.breakable
          end
          q.pp e
        end

        if elements.length > 5
          q.text ","
          q.breakable
          q.text "..."
        end
      end
    end
1358939
def print_header(self):
        """"""
        lines_to_print = []
        lines_to_print.append('##fileformat='+self.fileformat)
        if self.filedate:
            lines_to_print.append('##fileformat='+self.fileformat)
            
        for filt in self.filter_dict:
            lines_to_print.append(self.filter_dict[filt])
        for form in self.format_dict:
            lines_to_print.append(self.format_dict[form])
        for info in self.info_dict:
            lines_to_print.append(self.info_dict[info])
        for contig in self.contig_dict:
            lines_to_print.append(self.contig_dict[contig])
        for alt in self.alt_dict:
            lines_to_print.append(self.alt_dict[alt])
        for other in self.other_dict:
            lines_to_print.append(self.other_dict[other])
        lines_to_print.append('#'+ '\t'.join(self.header))
        return lines_to_print
723995
def format(self, obj, **kwargs):
        """"""
        sio = StringIO()
        self.fprint(obj, stream=sio, **kwargs)
        return sio.getvalue()
1035365
def _print_divide(self):
        """"""
        for space in self.AttributesLength:
            self.StrTable += "+ " + "- " * space
        self.StrTable += "+" + "\n"
36426
def print(formatted = false)
      result = "#{rule}, #{description}"
      if formatted
        if failure
          result = "#{FORMATTING_BALL} #{result}".colorize(:red)
        else
          result = "#{FORMATTING_WARNING} #{result}".colorize(:yellow)
        end
      end
      result += "\n#{location.print}" unless location.nil?
      result += "\nRECOMMENDATION: #{recommendation}" unless recommendation.nil?
      result
    end
637453
def style_print(*values, **kwargs):
    
    style = kwargs.pop("style", None)
    values = [style_format(value, style) for value in values]
    print(*values, **kwargs)