Dumps an AST or similar structure:

       - Pretty-prints with indentation
       - Doesn't print line/column/ctx info
193058
def dump_tree(node, name=None, initial_indent='', indentation='    ',
              maxline=120, maxmerged=80,
              # Runtime optimization
              iter_node=iter_node, special=ast.AST,
              list=list, isinstance=isinstance, type=type, len=len):
    
    def dump(node, name=None, indent=''):
        level = indent + indentation
        name = name and name + '=' or ''
        values = list(iter_node(node))
        if isinstance(node, list):
            prefix, suffix = '%s[' % name, ']'
        elif values:
            prefix, suffix = '%s%s(' % (name, type(node).__name__), ')'
        elif isinstance(node, special):
            prefix, suffix = name + type(node).__name__, ''
        else:
            return '%s%s' % (name, repr(node))
        node = [dump(a, b, level) for a, b in values if b != 'ctx']
        oneline = '%s%s%s' % (prefix, ', '.join(node), suffix)
        if len(oneline) + len(indent) < maxline:
            return '%s' % oneline
        if node and len(prefix) + len(node[0]) < maxmerged:
            prefix = '%s%s,' % (prefix, node.pop(0))
        node = (',\n%s' % level).join(node).lstrip()
        return '%s\n%s%s%s' % (prefix, level, node, suffix)
    return dump(node, name, initial_indent)
997163
def dump(self, f, name):
        """"""
        array = self.get()
        # print the header line
        print("% 40s  kind=%s  shape=(%s)" % (
            name,
            array.dtype.kind,
            ",".join([str(int(size_axis)) for size_axis in array.shape]),
        ), file=f)
        # print the numbers
        counter = 0
        for value in array.flat:
            counter += 1
            print("% 20s" % value, end=' ', file=f)
            if counter % 4 == 0:
                print(file=f)
        if counter % 4 != 0:
            print(file=f)
593525
def pretty_print(self, obj):
        
        s = repr(obj)
        limit = output_limit()
        if len(s) > limit:
            if self.dom_term:
                s = self.color.py_syntax_highlight(s)
                s = self.dom_term.fold_text_string("", s)
            else:
                s = s[:limit - 3]  # cut before syntax highlighting, to avoid missing color endings
                s = self.color.py_syntax_highlight(s)
                s += "..."
        else:
            s = self.color.py_syntax_highlight(s)
        extra_info = self._pp_extra_info(obj)
        if extra_info != "":
            s += ", " + self.color.py_syntax_highlight(extra_info)
        return s
655578
def dump(self, stream):
        
        if self.prettyprint:
            self.indent(self.xml)
        document = etree.ElementTree(self.xml)
        header = '<?xml version="1.0" encoding="%s"?>' % self.encoding
        stream.write(header.encode(self.encoding))
        document.write(stream, encoding=self.encoding)
326351
def pretty_str(self, indent=0):
        
        if self.body:
            return '\n'.join(stmt.pretty_str(indent) for stmt in self.body)
        else:
            return (' ' * indent) + '[empty]'
263267
def pretty_params(data, indent=2):
    
    data_to_print = _series_data_filter(data)
    print(json.dumps(data_to_print, indent=indent))
184472
def handle_raw_output(ctx, data):
    """"""
    if ctx.obj['format'] == 'json':
        print(json_dump(data))
        exit(0)
    if ctx.obj['format'] == 'yaml':
        print(yaml_dump(data), end='')
        exit(0)
1237671
def write_pretty_dict_str(out, obj, indent=2):
    """"""
    json.dump(obj,
              out,
              indent=indent,
              sort_keys=True,
              separators=(',', ': '),
              ensure_ascii=False,
              encoding="utf-8")
763249
def dump(self, f, indent=''):
        """"""
        if self.__unit is None:
            print(("%s%s %s" % (indent, self.__name, self.__value)).rstrip(), file=f)
        else:
            print(("%s%s [%s] %s" % (indent, self.__name, self.__unit, self.__value)).rstrip(), file=f)
492033
def pretty_str(self, indent=0):
        
        return '\n\n'.join(
                codeobj.pretty_str(indent=indent)
                for codeobj in self.children
        )
246909
def __dump_stack(self):
        
        maxdepth = len(self._mode_stack)
        maxdepth_strlen = len(str(maxdepth))
        index_width = 4 - (-maxdepth_strlen) % 4 + 4
        index_str = lambda i: '{:<{}d}'.format(i, index_width)

        self.stdout.write(index_str(0) + self.root_prompt)
        self.stdout.write('\n')

        tree_prefix = '└── '
        for i in range(maxdepth):
            index_prefix = index_str(i + 1)
            whitespace_prefix = ' ' * len(tree_prefix) * i
            mode = self._mode_stack[i]
            line = index_prefix + whitespace_prefix + \
                    tree_prefix + mode.prompt + \
                    ': {}@{}'.format(mode.cmd, mode.args)
            self.stdout.write(line)
            self.stdout.write('\n')
881488
def _json_pretty_print(self, content):
        
        temp = json.loads(content)
        return json.dumps(
            temp,
            sort_keys=True,
            indent=4,
            separators=(
                ',',
                ': '))
472699
def pretty_print(q)
      map = pretty_print_attribute_hash.delete_if { |k, v| v.nil_or_empty? }
      # one indented line per entry, all but the last line ending in a comma
      content = map.map { |label, value| "  #{label}=>#{format_print_value(value)}" }.join(",\n")
      # print the content to the log
      q.text("#{qp} structure:\n#{content}")
    end
380156
def ret_dump(self, d_ret, **kwargs):
        
        b_print     = True
        for k, v in kwargs.items():
            if k == 'JSONprint':    b_print     = bool(v)
        if b_print:
            print(
                json.dumps(   
                    d_ret, 
                    indent      = 4,
                    sort_keys   = True
                )
        )
609843
def custom_print(data_structure, indent):
    
    for key, value in data_structure.items():
        print("\n%s%s:" % (' ' * attribute_indent * indent, str(key)), end=' ')
        if isinstance(value, OrderedDict):
            custom_print(value, indent + 1)
        elif isinstance(value, dict):
            custom_print(value, indent + 1)
        else:
            print("%s" % (str(value)), end=' ')
224420
def dump(self, indentation=0):
        """"""
        
        dump = []
        
        dump.append('[%s]' % self.name)
        
        # Refer to the __set_format__ method for an explanation
        # of the following construct.
        for keys in self.__keys__:
            for key in keys:
                
                val = getattr(self, key)
                if isinstance(val, int) or isinstance(val, long):
                    val_str = '0x%-8X' % (val)
                    if key == 'TimeDateStamp' or key == 'dwTimeStamp':
                        try:
                            val_str += ' [%s UTC]' % time.asctime(time.gmtime(val))
                        except exceptions.ValueError, e:
                            val_str += ' [INVALID TIME]'
                else:
                    val_str = ''.join(filter(lambda c:c != '\0', str(val)))
                
                dump.append('0x%-8X 0x%-3X %-30s %s' % (
                    self.__field_offsets__[key] + self.__file_offset__, 
                    self.__field_offsets__[key], key+':', val_str))
        
        return dump
671901
@Override
    public void prettyPrint(StringBuffer sb, int indent)
    {
        sb.append(Log.getSpaces(indent));
        sb.append(GVRBone.class.getSimpleName());
        sb.append(" [name=" + getName() + ", boneId=" + getBoneId()
                + ", offsetMatrix=" + getOffsetMatrix()
                + ", finalTransformMatrix=" + getFinalTransformMatrix() // crashes debugger
                + "]");
        sb.append(System.lineSeparator());
    }