Analog of print() but with an indent option
17664
def output(*args, **kwargs):
    '''
    '''
    indent = kwargs.pop('indent', 0)
    sep = kwargs.pop('sep', None)
    kwargs['sep'] = u''  # Sanity
    if sep is None:
        sep = u' '
    indent_str = u' ' * (indent * tab_width)
    text = sep.join(map(str_, args))
    color = kwargs.pop('color', None)
    if color:
        color.bright = kwargs.pop('bright', None)
        text = ColorText(text, color)
    print(indent_str + text, **kwargs)
864382
def ansiprint(self, *args, **kwargs):
        ''''''
        args = (self.parse(str(i)) for i in args)
        builtins.print(*args, **kwargs)
650167
def pretty_print(n):
    """"""
    if type(n) != int:
        return n

    ret = []
    n = str(n)
    for i in range(len(n) - 1, -1, -1):
        ret.append(n[i])
        if (len(n) - i) % 3 == 0:
            ret.append(',')
    ret.reverse()
    return ''.join(ret[1:]) if ret[0] == ',' else ''.join(ret)
1070367
def printout(*args, **kwargs):
    

    # TODO(Lukas): conflicts with function names
    color = kwargs.pop('color', {})
    style = kwargs.pop('style', {})
    prefx = kwargs.pop('prefix', '')
    suffx = kwargs.pop('suffix', '')
    ind = kwargs.pop('indent', 0)

    print_args = []
    for arg in args:
        arg = str(arg)
        arg = colorize(arg, **color)
        arg = stylize(arg, **style)
        arg = prefix(arg, prefx)
        arg = indent(arg, ind)
        arg += str(suffx)
        print_args.append(arg)

    print(*print_args, **kwargs)
969306
public void printIndent() {
        for (int i = 0; i < indentLevel; i++) {
            try {
                out.write(indent);
            } catch(IOException ioe) {
                throw new GroovyRuntimeException(ioe);
            }
        }
    }
631519
def print(self, indent=0):
        """"""
        LOG.info("%s:: %s", indent * " ", self.__class__)
        for ext in self.next_extensions:
            ext.print(indent=indent + 2)
147571
def printer(data, depth=0):
    
    indent = _INDENT * depth
    config_string = '' if not depth else ':\n'
    if isinstance(data, dict):
        for key, val in data.items():
            line = '{0}{1}'.format(indent, key)
            values = printer(val, depth + 1)
            if not values.count('\n'):
                values = ': {0}'.format(values.lstrip())

            line = '{line}{values}'.format(line=line, values=values)
            config_string += '{0}\n'.format(line)

    elif isinstance(data, list):
        for elem in data:
            config_string += '{0} - {1}\n'.format(indent, elem)
    else:
        config_string = '{0}{1} ({2})'.format(
            indent, data, data.__class__.__name__
        )

    return config_string.rstrip('\n')
125934
function print(str, indent, inline) {
  var lines = str.split('\n');

  lines.forEach((line, i) => {
    if (line && ((inline && i > 0) || !inline)) {
      process.stdout.write((' ').repeat(indent));
    }
    const nl = (i === lines.length - 1) ? '' : '\n';
    process.stdout.write(`${line}${nl}`);
  });
}
100382
private static String emitCommentIndentNOnly(PrintWriter fp, String text, int indent) {
		synchronized (lock) {
			return (emitCommentIndentNOnly(fp, text, indent, true));
		}
	}
977874
function printNodes(node, indent) {
  indent = indent || 0;

  print(node.typename + ': ', indent);

  if (node instanceof NodeList) {
    print('\n');
    node.children.forEach((n) => {
      printNodes(n, indent + 2);
    });
  } else if (node instanceof CallExtension) {
    print(`${node.extName}.${node.prop}\n`);

    if (node.args) {
      printNodes(node.args, indent + 2);
    }

    if (node.contentArgs) {
      node.contentArgs.forEach((n) => {
        printNodes(n, indent + 2);
      });
    }
  } else {
    let nodes = [];
    let props = null;

    node.iterFields((val, fieldName) => {
      if (val instanceof Node) {
        nodes.push([fieldName, val]);
      } else {
        props = props || {};
        props[fieldName] = val;
      }
    });

    if (props) {
      print(JSON.stringify(props, null, 2) + '\n', null, true);
    } else {
      print('\n');
    }

    nodes.forEach(([fieldName, n]) => {
      print(`[${fieldName}] =>`, indent + 2);
      printNodes(n, indent + 4);
    });
  }
}
1094754
def _indent_line(self, line, stripspace=''):
        """"""

        return re.sub(r"^%s" % stripspace, self.indentstring
                      * self.indent, line)
1247637
def imp_print(self, text, end):
		""""""
		PRINT(text, end=end, file=win_unicode_console.streams.stdout_text_transcoded)
171114
def pprint(data, indent=0, end='\n'):
    
    if isinstance(data, dict):
        print('{')
        new_indent = indent + 4
        space = ' ' * new_indent
        keys = list(sorted(data.keys()))
        for i, k in enumerate(keys):
            print(space, json.dumps(k), ': ', sep='', end='')
            pprint(data[k], new_indent,
                   end=',\n' if i < len(keys) - 1 else '\n')
        print(' ' * indent, '}', sep='', end=end)
    elif isinstance(data, list):
        if any(isinstance(x, (dict, list)) for x in data):
            print('[')
            new_indent = indent + 4
            space = ' ' * new_indent
            for i, x in enumerate(data):
                print(space, end='')
                pprint(x, new_indent,
                       end=',\n' if i < len(data) - 1 else '\n')
            print(' ' * indent, ']', sep='', end=end)
        else:
            print(json.dumps(data), end=end)
    else:
        print(json.dumps(data), end=end)
316443
def _print_config_text(tree, indentation=0):
    '''
    
    '''
    config = ''
    for key, value in six.iteritems(tree):
        config += '{indent}{line}\n'.format(indent=' '*indentation, line=key)
        if value:
            config += _print_config_text(value, indentation=indentation+1)
    return config
1133157
function printNodes(node, indent) {
            indent = indent || 0;

            // This is hacky, but this is just a debugging function anyway
            function print(str, indent, inline) {
                var lines = str.split("\n");

                for (var i = 0; i < lines.length; i++) {
                    if (lines[i]) {
                        if ((inline && i > 0) || !inline) {
                            for (var j = 0; j < indent; j++) {
                                util.print(" ");
                            }
                        }
                    }

                    if (i === lines.length - 1) {
                        util.print(lines[i]);
                    } else {
                        util.puts(lines[i]);
                    }
                }
            }

            print(node.typename + ": ", indent);

            if (node instanceof NodeList) {
                print('\n');
                lib.each(node.children, function(n) {
                    printNodes(n, indent + 2);
                });
            } else if (node instanceof CallExtension) {
                print(node.extName + '.' + node.prop);
                print('\n');

                if (node.args) {
                    printNodes(node.args, indent + 2);
                }

                if (node.contentArgs) {
                    lib.each(node.contentArgs, function(n) {
                        printNodes(n, indent + 2);
                    });
                }
            } else {
                var nodes = null;
                var props = null;

                node.iterFields(function(val, field) {
                    if (val instanceof Node) {
                        nodes = nodes || {};
                        nodes[field] = val;
                    } else {
                        props = props || {};
                        props[field] = val;
                    }
                });

                if (props) {
                    print(util.inspect(props, true, null) + '\n', null, true);
                } else {
                    print('\n');
                }

                if (nodes) {
                    for (var k in nodes) {
                        printNodes(nodes[k], indent + 2);
                    }
                }

            }
        }
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')
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"")
        )