Prints the stack
162301
def printStack(self,wrappedStack,include=None,filters=["*"]):
        """"""
        rawStack = wrappedStack['rawStack']
        print "==== Stack {} ====".format(rawStack.name)
        print "Status: {} {}".format(rawStack.stack_status,defaultify(rawStack.stack_status_reason,''))

        for resourceType, resources in wrappedStack['resourcesByTypeIndex'].items():
            if resourceType in AwsProcessor.resourceTypeAliases:
                resourceType = AwsProcessor.resourceTypeAliases[resourceType];
            if (None == include or resourceType in include) and len(resources):
                print "== {}:".format(resourceType)
                logicalIdWidth = 1
                resourceStatusWidth = 1
                resourceStatusReasonWidth = 1
                for index, resource in resources.items():
                    logicalIdWidth = max(logicalIdWidth,len(resource.logical_id))
                    resourceStatusWidth = min(50,max(resourceStatusWidth,len(resource.resource_status)))
                    resourceStatusReasonWidth = min(50,max(resourceStatusReasonWidth,len(defaultify(resource.resource_status_reason,''))))
                frm = "    {{0:3d}}: {{1:{0}}} {{2:{1}}} {{3}}".format(logicalIdWidth,resourceStatusWidth)
                for index, resource in resources.items():
                    if fnmatches(resource.logical_id.lower(),filters):
                        print frm.format(index,resource.logical_id,
                                         elipsifyMiddle(repr(resource.resource_status),50),
                                         elipsifyMiddle(repr(defaultify(resource.resource_status_reason,'')),150))
157923
private String printStackTrace(Object[] stackTrace) {
        StringBuilder output = new StringBuilder();
        for (Object line : stackTrace) {
            output.append(line);
            output.append(newline);
        }
        return output.toString();
    }
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)
846342
def do_show(self, args):
		""""""
		self.print_line('')
		if args.thing == 'modules':
			self.print_line('Modules' + os.linesep + '=======')
			headers = ('Name', 'Description')
			rows = [(module.path, module.description) for module in self.frmwk.modules.values()]
		else:
			if self.frmwk.current_module and args.thing == 'options':
				options = self.frmwk.current_module.options
				self.print_line('Module Options' + os.linesep + '==============')
			if self.frmwk.current_module and args.thing == 'advanced':
				options = self.frmwk.current_module.advanced_options
				self.print_line('Advanced Module Options' + os.linesep + '=======================')
			elif self.frmwk.current_module is None and args.thing == 'options':
				options = self.frmwk.options
				self.print_line('Framework Options' + os.linesep + '=================')
			elif self.frmwk.current_module is None and args.thing == 'advanced':
				options = self.frmwk.advanced_options
				self.print_line('Advanced Framework Options' + os.linesep + '==========================')
			headers = ('Name', 'Value', 'Description')
			raw_options = [options.get_option(name) for name in options]
			rows = [(option.name, str(option.value), option.help) for option in raw_options]
		rows = sorted(rows, key=lambda row: row[0])
		self.print_line('')
		self.frmwk.print_table(rows, headers=headers, line_prefix='  ')
		self.print_line('')
		return
239201
def stack
      @stack ||= reader.execute(
        name: stack_name,
        parent_name: self.respond_to?(:parent_name) ? self.parent_name : nil,
        values: (self.respond_to?(:values_from_options) ? self.values_from_options : {})
      )
    end
1060296
private final static void printStackTrace(Throwable t, PrintWriter p) {
        if (t == null) {
            p.println("none");
            return;
        }

        // Capture any exceptions while printing stack so we return what we have
        // so far
        try {
            // Print the stack trace of the Throwable.
            t.printStackTrace(p);
        } catch (Throwable e) {
            // Do not throw exception, add a message to PrintWriter and return
            // what we have so far.
            p.println("<Encountered exception while printing stack trace>");
            p.println(e.getClass().getName() + ": " + e.getMessage());
            return;
        }

        // Handle the degenerate case of a TraceException which contains an
        // array of Throwables.
//        if (t instanceof TraceException) {
//            TraceException te = (TraceException) t;
//            Throwable subexs[] = te.getSubexceptions();
//            if (subexs == null)
//                return;
//            for (int i = 0; i < subexs.length; i++) {
//                p.println("----- Begin backtrace for subexception[" + i + "]");
//                printStackTrace(subexs[i], p);
//            }
//            return;
//        }

        // Normal Throwables may contain a single nested Throwable. So this
        // Throwable could be the
        // start of a chain of Throwables. We want to obtain the stack traces of
        // all Throwables in
        // the chain so we can see the entire history, execution path and root
        // exception.
        // Some Throwables that support nesting provide support for
        // automatically walking the chain
        // by providing the appropriate printStackTrace() overrides. Others do
        // not, which means we
        // need to manually walk the chain if we want to obtain all the stack
        // traces.
        // If printStackTrace is called on a Throwable chain that contains
        // Throwables that have
        // overriden printStackTrace, the recursion will end after printing out
        // the stack trace of
        // the first Throwable that does not provide an override. If
        // printStackTrace is called on
        // a chain where the base Throwable does not provide the override, then
        // only the stack trace
        // of the base Throwable will have been printed. Therefore, to obtain
        // the next Throwable that
        // needs its stack trace printed, simply walk the chain starting at the
        // base, find the first
        // Throwable that does not provide an override, then start with that
        // guys nested Throwable.

        // updated to support J2SE1.4's nested Throwables.

        boolean autoRecursion = true;
        Throwable tNext = null;

        // Capture any exceptions while calculating nexted exception so we return what we have
        // so far
        try {
            // Compute tNext - the first Throwable in the stack that doesn't recurse
            // properly
            while (autoRecursion) {

                // all known throwables printStackTrace methods recurse properly
                // when cause is set.
                tNext = t.getCause();
                if (tNext != null) {
                    t = tNext;
                } else {
                    tNext = getNestedThrowable(t);
                    if (tNext == null) {
                        // no cause or nested Throwable - done
                        return;
                    }

                    // some of the known throwables with custom nesting don't
                    // recurse properly
                    if (pstRecursesOnNested(t)) {
                        t = tNext;
                    } else {
                        autoRecursion = false;
                    }
                }

            }
        } catch (Throwable e) {
            // Do not throw exception, add a message to PrintWriter and return
            // what we have so far.
            p.println("<Encountered exception while calculating a nested throwable>");
            p.println(e.getClass().getName() + ": " + e.getMessage());
            try {
                // Try to convert that exception into a stack trace.
                e.printStackTrace(p);
            } catch (Throwable e2) {
                p.println("<Caught exception while printing stack trace from failed nested calculation>");
                p.println(e2.getClass().getName() + ": " + e2.getMessage());
            }
            return;
        }

        // tNext will not be null at this point

        // Have found the first Throwable that doesn't include nested throwable
        // in printStackTrace
        // Obtain the nested Throwable and keep going.
        p.println("---- Begin backtrace for Nested Throwables");
        printStackTrace(tNext, p);

        /*
         * while (pstRecurses(t)) { t = getNestedThrowable(t); if (t == null)
         * return; }
         *
         * // Have found the first Throwable that doesn't override
         * printStackTrace. // Obtain the nested Throwable and keep going. t =
         * getNestedThrowable(t); if (t == null) return;
         * p.println("---- Begin backtrace for Nested Throwables");
         * printStackTrace(t, p);
         */
    }
287390
public void printStack(long tid) throws IOException {
		System.out.printf("%n Stack trace of thread %d:%n", tid);

		ThreadInfo info = view.vmInfo.getThreadInfo(tid, 20);
		if (info == null) {
			System.err.println(" TID not exist:" + tid);
			return;
		}
		printSingleThread(info);
		System.out.flush();
	}
15485
@Override
    void dump_i(final int indent_level) {
	for (int i = 0; i < indent_level; i++) {
	    System.out.print("  ");
	}
	System.out.println("|- Group: " + get_name() + " [" + get_size_i(true) + ":" + get_size_i(false) + "]");
	final Iterator it = elements.iterator();
	while (it.hasNext()) {
	    ((GroupElement) it.next()).dump_i(indent_level + 1);
	}
    }
234628
public static void printStackTrace(StackTraceElement[] trace, java.io.PrintStream out) {
        Strand.printStackTrace(trace, out);
    }
646917
func (st *Stack) Print() {
	fmt.Println("### stack ###")
	if len(st.data) > 0 {
		for i, val := range st.data {
			fmt.Printf("%-3d  %v\n", i, val)
		}
	} else {
		fmt.Println("-- empty --")
	}
	fmt.Println("#############")
}
926143
def dump_stacks(self):
        '''
        
        '''

        dump = []

        # threads
        threads = dict([(th.ident, th.name)
                            for th in threading.enumerate()])

        for thread, frame in sys._current_frames().items():
            if thread not in threads: continue
            dump.append('Thread 0x%x (%s)\n' % (thread, threads[thread]))
            dump.append(''.join(traceback.format_stack(frame)))
            dump.append('\n')

        return ''.join(dump)
493418
def _format_stack(self, stack, current=None):
        
        if current is not None:
            stack = stack + [current]
        if len(stack) > 1:
            prefix = os.path.commonprefix(stack)
            if prefix.endswith('/'):
                prefix = prefix[:-1]
            stack = [scope[len(prefix):] for scope in stack]
        return ' => '.join(stack)
639033
function print() {
        var parts = String(out).split('\n');
        /* istanbul ignore next */
        if (parts.length > 1) {
          out = parts.pop();
          var logging = String(parts.join('\n')).replace(/\r\r/g, '\r');
          slf.log(logging);
        }
        /* istanbul ignore next */
        if (closed === false) {
          setTimeout(function () {
            print();
          }, 50);
        }
      }
15882
public void printStuff() {
        System.out.println("Font name:   " + fontName);
        System.out.println("Full name:   " + fullName);
        System.out.println("Family name: " + familyName);
        System.out.println("Subfamily name: " + subFamilyName);
        System.out.println("Notice:      " + notice);
        System.out.println("xHeight:     " + (xHeight));
        System.out.println("capheight:   " + (capHeight));

        int italic = (int)(italicAngle >> 16);
        System.out.println("Italic:      " + italic);
        System.out.print("ItalicAngle: " + (short)(italicAngle / 0x10000));
        if ((italicAngle % 0x10000) > 0) {
            System.out.print("."
                             + (short)((italicAngle % 0x10000) * 1000)
                               / 0x10000);
        }
        System.out.println();
        System.out.println("Ascender:    " + (ascender));
        System.out.println("Descender:   " + (descender));
        System.out.println("FontBBox:    [" + (fontBBox1)
                           + " " + (fontBBox2) + " "
                           + (fontBBox3) + " "
                           + (fontBBox4) + "]");
    }
201141
private static String stackTraceToString(List<StackTraceElement> stack) {
		return StringPrinter.buildString(printer -> {
			for (StackTraceElement element : stack) {
				printer.print("at ");
				printer.print(element.getClassName());
				printer.print(".");
				printer.print(element.getMethodName());
				printer.print("(");
				printer.print(element.getFileName());
				printer.print(":");
				printer.print(Integer.toString(element.getLineNumber()));
				printer.println(")");
			}
		});
	}
597594
def Printf(params, ctxt, scope, stream, coord, interp):
    
    if len(params) == 1:
        if interp._printf:
            sys.stdout.write(PYSTR(params[0]))
        return len(PYSTR(params[0]))

    parts = []
    for part in params[1:]:
        if isinstance(part, pfp.fields.Array) or isinstance(part, pfp.fields.String):
            parts.append(PYSTR(part))
        else:
            parts.append(PYVAL(part))

    to_print = PYSTR(params[0]) % tuple(parts)
    res = len(to_print)

    if interp._printf:
        sys.stdout.write(to_print)
        sys.stdout.flush()
    return res
680525
def do_stacktrace(self) -> None:
        """"""
        frame = sys._current_frames()[self._event_loop_thread_id]
        traceback.print_stack(frame, file=self._sout)