dump the current context to a PrintWriter
355401
public void dumpContext(PrintWriter writer) {
        try {
            NamingEnumeration<NameClassPair> list = context.list("/");
            writer.print("\n{\n  name: \"");
            /*writer.print(this.namespace);
            writer.print(" ");*/
            writer.print(this.root);
            writer.println("\",\n  children: [");
            enumerate(list, "/", writer);
            writer.println("]}");
            writer.flush();
        } catch (NamingException e) {
            e.printStackTrace(writer);
        }
    }
1127257
def export_context(cls, context):
		
		if context is None:
			return
		result = [(x.context_name(), x.context_value()) for x in context]
		result.reverse()
		return tuple(result)
590985
private static String printStatements(Context context, Iterable<JCStatement> statements) {
    StringWriter writer = new StringWriter();
    try {
      pretty(context, writer).printStats(com.sun.tools.javac.util.List.from(statements));
    } catch (IOException e) {
      throw new AssertionError("StringWriter cannot throw IOExceptions");
    }
    return writer.toString();
  }
1174367
def dump(self, src, length=16, start=0, preffix=""):
        """"""
        FILTER = \
            "".join([(len(repr(chr(x)))==3) and chr(x) or '.' \
                for x in xrange(256)])

        result = list()

        for i in xrange(0, len(src), length):
            s           = src[i : i + length]
            hexa        = " ".join(["%02X" % ord(x) for x in s])
            printable   = s.translate(FILTER)

            result.append("%s%08X   %-*s   %s\n" % \
                (preffix, start + i, length * 3, hexa, printable))

        return ''.join(result)
268007
def dump(self, indentlevel=0, target=sys.stdout):
        
        self.__print(self, indentlevel, target=target)
        indentlevel += 4
        if self.has_arguments():
            for arg in self.args_definition:
                if not arg["name"] in self.arguments:
                    continue
                value = self.arguments[arg["name"]]
                atype = arg["type"]
                if "tag" in atype:
                    self.__print(str(value), indentlevel, target=target)
                    if arg["name"] in self.extra_arguments:
                        value = self.extra_arguments[arg["name"]]
                        atype = arg["extra_arg"]["type"]
                    else:
                        continue
                if type(value) == list:
                    if self.__get_arg_type(arg["name"]) == ["testlist"]:
                        for t in value:
                            t.dump(indentlevel, target)
                    else:
                        self.__print("[" + (",".join(value)) + "]",
                                     indentlevel, target=target)
                    continue
                if isinstance(value, Command):
                    value.dump(indentlevel, target)
                    continue
                self.__print(str(value), indentlevel, target=target)
        for ch in self.children:
            ch.dump(indentlevel, target)
412827
def dump(cls):
        """"""
        with cls.lock:
            if not cls.instances: return
            atexit.unregister(cls.dump)

            cls._pre_dump()

            for self in cls.instances.values():
                self._dump()

            cls._post_dump()
880552
public void dump(Writer writer) {
        PrintWriter printer = new PrintWriter(writer);
        for (String sectionType : sectionsByType.keySet()) {
            int sectionNumber = 0;
            for (Section section : sectionsByType.get(sectionType)) {
                printer.printf("%s [%d]%n", sectionType, sectionNumber++);
                for (String key : section) {
                    printer.printf(" %30s -> %s%n", key, section.value(key));
                }
            }
            printer.println();
        }
        try {
            writer.flush();
        }
        catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
188595
def dumpcache(self):
		''' '''
		if cached.cacheloaded:
			#pprint.pprint(cached.cache)
			MyPrettyPrinter().pprint(cached.cache)
			return const.ENoError
		else:
			perr("Cache not loaded.")
			return const.ECacheNotLoaded
429444
def debug(context):
    

    from pprint import pformat
    output = [pformat(val) for val in context]
    output.append('\n\n')
    output.append(pformat(sys.modules))
    return ''.join(output)
39210
def do_dump(self, arg):
        '''  '''
        if not self.arm.is_connected():
            print(self.style.error('Error: ', 'Arm is not connected.'))
            return
        print(self.arm.dump())
193843
def dump_frame(frame, label=""):
    """"""
    locals = dict(frame.f_locals)
    self = locals.get('self', None)
    context = locals.get('context', None)
    if "__builtins__" in locals:
        del locals["__builtins__"]

    if label:
        label = " ( %s ) " % label
    print("-- frame --%s---------------------" % label)
    print("{}:{}:{}".format(
        os.path.basename(frame.f_code.co_filename),
        frame.f_lineno,
        type(self),
        ))
    print(locals)
    if self:
        print("self:", self.__dict__)
    if context:
        print("context:", context.__dict__)
    print("\\--")
893440
def dump(self):
        
        for seg in self.seglist:
            print("==== %08x-%08x" % (seg.startea, seg.endea))
            if seg.endea - seg.startea < 30:
                for ea in range(seg.startea, seg.endea):
                    print("    %08x: %08x" % (ea, self.getFlags(ea)))
            else:
                for ea in range(seg.startea, seg.startea + 10):
                    print("    %08x: %08x" % (ea, self.getFlags(ea)))
                print("...")
                for ea in range(seg.endea - 10, seg.endea):
                    print("    %08x: %08x" % (ea, self.getFlags(ea)))
110192
public void dumpTo(AreaTree tree, PrintWriter out)
    {
        if (produceHeader)
            out.println("<?xml version=\"1.0\"?>");
        out.println("<areaTree base=\"" + HTMLEntities(tree.getRoot().getPage().getSourceURL().toString()) + "\">");
        recursiveDump(tree.getRoot(), 1, out);
        out.println("</areaTree>");
    }
658757
public void print(java.io.PrintWriter printWriter)
    {
        synchronized (flushHelper) {
            synchronized (notifyHelper) {
                synchronized (logBufferLock) {
                    printWriter.println("State Dump for:" + cclass.getName()
                                        + " logFile=" + logFile + "(java.io.RandomaccessFile)"
                                        + " fileLogHeader=" + fileLogHeader + "(FileLogHeader)"
                                        + "\n filePosition=" + filePosition + "(long)"
                                        + " filePositionSectorByte=" + filePositionSectorByte + "(byte)"
                                        + " bufferFilePosition=" + bufferFilePosition + "(long)"
                                        + " bufferSectorByte=" + bufferSectorByte + "(byte)"
                                        + " fileSpaceLeft=" + fileSpaceLeft + "(long)"
                                    );
                    printWriter.println(" firstPageToFlush=" + firstPageToFlush + "(int)"
                                        + " lastPageNotified=" + lastPageNotified + "(int)"
                                        + " nextPageToNotify=" + nextPageToNotify + "(int)"
                                        + " firstPageFilling=" + firstPageFilling + "(int)"
                                        + " lastPageFilling=" + lastPageFilling + "(int)"
                                        + "\n nextFreeByteInLogBuffer=" + nextFreeByteInLogBuffer + "(int)"
                                        + " newLogBufferPages=" + newLogBufferPages + "(int)"
                                    );
                    printWriter.println();

                    logBuffer.print(printWriter);
                } // synchronized (logBufferLock).
            } // synchronized (notifyHelper).
        } // synchronized (flushHelper).
    }
1359733
static void dumpConfig(final String name, final Config config, final PrintWriter printWriter) {

        if (printWriter == null) {
            throw new IllegalArgumentException("writer argument cannot be null");
        }

        printWriter.println();
        printWriter.println("^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^");
        printWriter.println(name + " " + config.root().origin());
        printWriter.println(config.root().render(configRenderOptions));
        printWriter.flush();
    }
1195273
def pprint(self, ind):
        """"""
        pp = pprint.PrettyPrinter(indent=ind)
        pp.pprint(self.tree)
1040062
def dumps(self):
		
		out = ""
		for option in self.options:
			value = make_value(option.default_value)
			out += "%s = %s%s\n" % (option.name, value, 
				(" # %s" % option.comment) if option.comment else "")
		return out.rstrip("\n")