Pretty printing.
768064
def pp(self):
        
        # TODO: make it prettier
        for src, dst, data in self.graph.edges(data=True):
            print("%s <-- %s, %s" % (src, dst, data))
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)
1331462
function printAllAvailable() {
  if (!argv.available) {
    return;
  }

  const heading = chalk.blue.underline('AVAILABLE: All available stylelint rules:');
  const rulesToPrint = _.map(rules.stylelintAll, rule => {
    return {
      rule,
      url: chalk.cyan(`https://stylelint.io/user-guide/rules/${rule}/`)
    };
  });

  printColumns(heading, rulesToPrint);
}
1297992
def print_page_cb(self, print_op, print_context, keep_refs={}):
        
        ORIENTATION_PORTRAIT = 0
        ORIENTATION_LANDSCAPE = 1
        scaling = 2.0

        img = self.img
        (width, height) = img.size

        # take care of rotating the image if required
        if print_context.get_width() <= print_context.get_height():
            print_orientation = ORIENTATION_PORTRAIT
        else:
            print_orientation = ORIENTATION_LANDSCAPE
        if width <= height:
            img_orientation = ORIENTATION_PORTRAIT
        else:
            img_orientation = ORIENTATION_LANDSCAPE
        if print_orientation != img_orientation:
            logger.info("Rotating the page ...")
            img = img.rotate(90, expand=True)

        (width, height) = img.size

        # scale the image down
        # XXX(Jflesch): beware that we get floats for the page size ...
        scaling = min(
            print_context.get_width() / width,
            print_context.get_height() / height
        )

        logger.info("DPI: %fx%f" % (print_context.get_dpi_x(),
                                    print_context.get_dpi_y()))

        surface = image2surface(img)
        keep_refs['surface_cache_' + str(self.page_nb)] = surface

        # .. and print !
        cairo_context = print_context.get_cairo_context()
        cairo_context.scale(scaling, scaling)
        cairo_context.set_source_surface(surface, 0, 0)
        cairo_context.paint()
787168
def nice_display(item):
    """"""
    if hasattr(item, 'all'):  # RelatedManager: display a list
        return ', '.join(map(text_type, item.all()))
    return item
1296909
def _print(self, ms, style="TIP"):
        
        styles1 = {'IMPORTANT': Style.BRIGHT,
                   'TIP': Style.DIM,
                   'URI': Style.BRIGHT,
                   'TEXT': Fore.GREEN,
                   'MAGENTA': Fore.MAGENTA,
                   'BLUE': Fore.BLUE,
                   'GREEN': Fore.GREEN,
                   'RED': Fore.RED,
                   'DEFAULT': Style.DIM,
                   }
        try:
            print(styles1[style] + ms + Style.RESET_ALL)
        except:
            print(styles1['DEFAULT'] + ms + Style.RESET_ALL)
691934
def prettyPrintPacket(ctrl_table):
	
	print('---------------------------------------')
	print("{:.<29} {}".format('id', ctrl_table['id']))
	ctrl_table.pop('id')
	for key, value in ctrl_table.items():
		print("{:.<29} {}".format(key, value))
1062859
def prettyprint(self):
        """"""
        return json.dumps(self.asJSON(), sort_keys=True, indent=4, separators=(',', ': '))
526586
def pretty_print_table_instance(table):
    """"""
    assert isinstance(table, Table)

    def pretty_print_row(styled, plain):
        """Pretty print a row."""
        click.secho(
            " | ".join(
                v + " " * (table.column_widths[k] - len(plain[k]))
                for k, v in enumerate(styled)
            )
        )

    pretty_print_row(table.headers, table.plain_headers)
    for k, row in enumerate(table.rows):
        pretty_print_row(row, table.plain_rows[k])
175075
def visit_print(self, node):
        """"""
        nodes = ", ".join(n.accept(self) for n in node.values)
        if not node.nl:
            nodes = "%s," % nodes
        if node.dest:
            return "print >> %s, %s" % (node.dest.accept(self), nodes)
        return "print %s" % nodes
917460
def pretty_print_post(req):
    
    print(('{}\n{}\n{}\n\n{}'.format(
        '-----------START-----------',
        req.method + ' ' + req.url,
        '\n'.join('{}: {}'.format(k, v) for k, v in list(req.headers.items())),
        req.body,
    )))
582104
def pretty_print(q)
      q.instance_exec(self) do |obj|
        object_group_text = obj.respond_to?(:object_group_text) ? ' ' + obj.object_group_text : ''
        text "\#[<#{obj.class}#{object_group_text}>"
        group_sub {
          nest(2) {
            breakable(obj.any? { true } ? ' ' : '')
            seplist(obj, nil, :each) { |e|
              pp e
            }
          }
        }
        breakable ''
        text ']'
      end
    end
814404
def pretty_print(node):
        
        for pre, _, node in RenderTree(node):
            print('{}{}'.format(pre, node.name))
932207
def pretty(d, indent=0):
    
    for key, value in d.items():
        print('  ' * indent + str(key))
        if isinstance(value, dict):
            pretty(value, indent+1)
        else:
            sys.stderr.write('  ' * (indent+1) + str(value) + '\n')
683696
def pformat(object, indent=1, width=80, depth=None):
    """"""
    return PrettyPrinter(indent=indent, width=width, depth=depth).pformat(object)
508077
def pretty(self, indent=1, debug=False):
        
        debug_details = ''
        if debug:
            debug_details += '<isliteral=%r, iscanonical=%r>' % (self.isliteral, self.iscanonical)
        if self.isliteral:
            pretty_literal = self.args[0].pretty(indent=0, debug=debug)
            return (' ' * indent) + '%s(%s%s)' % (self.__class__.__name__, debug_details, pretty_literal)
        else:
            return super(NOT, self).pretty(indent=indent, debug=debug)
291358
def pretty_print(self):
        
        return u"%s\t%.3f\t%.3f\t%s" % (
            (self.identifier or u""),
            (self.begin if self.begin is not None else TimeValue("-2.000")),
            (self.end if self.end is not None else TimeValue("-1.000")),
            (self.text or u"")
        )