Given a todo item, pretty print it.
489946
def print_todo(self, p_todo):
        
        todo_str = p_todo.source()

        for ppf in self.filters:
            todo_str = ppf.filter(todo_str, p_todo)

        return TopydoString(todo_str)
726349
function() {

			this.$("#todo-list").html('');

			switch(window.app.TodoFilter){
				case "active":
					_.each(window.app.Todos.remaining(), this.addOne);
					break;
				case "completed":
					_.each(window.app.Todos.completed(), this.addOne);
					break;
				default:
					window.app.Todos.each(this.addOne, this);
					break;
			}

		}
864904
function outputToStdout(prettyPrint) {
  if (prettyPrint && !_.isNumber(prettyPrint)) {
    prettyPrint = 4;
  }
  return function(err, value, callback) {
    if (err) {
      console.error(err);
    } else {
      var str = JSON.stringify(value, null, prettyPrint);
      console.log(str);
    }
    callback(err, value);
  };
}
370409
def pprint(data):
    
    pretty = json.dumps(data, sort_keys=True, indent=4, separators=(",", ": "))
    html = pretty.replace(" ", "&nbsp;").replace("\n", "<br>")
    return mark_safe("<code>%s</code>" % html)
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)
485664
public function prettyPrint()
    {
        print($this->ecode . " (" . $this->getHttpStatus() . "): " .
            $this->getMessage() . "\n");
        if (!empty($this->errors)) {
            print("Field errors:\n");
            foreach($this->errors as $field_error) {
                foreach($field_error as $k => $v) {
                    print("  " . $k . ": " . $v . "\n");
                }
                print("\n");
            }
        }
    }
432133
def pretty_print(self, warnings=False):
        
        msg = []
        if (warnings) and (len(self.warnings) > 0):
            msg.append(u"Warnings:")
            for warning in self.warnings:
                msg.append(u"  %s" % warning)
        if len(self.errors) > 0:
            msg.append(u"Errors:")
            for error in self.errors:
                msg.append(u"  %s" % error)
        return u"\n".join(msg)
133276
protected static String prettyPrint(Object obj){
		StringBuilder sb = new StringBuilder();
		if (obj == null){
			sb.append("NULL");
		} else 	if (obj instanceof Blob){
			sb.append(formatLogParam((Blob)obj));
		} else if (obj instanceof Clob){
			sb.append(formatLogParam((Clob)obj));
		} else if (obj instanceof Ref){
			sb.append(formatLogParam((Ref)obj));
		} else if (obj instanceof Array){
			sb.append(formatLogParam((Array)obj));
		} else if (obj instanceof String || obj instanceof Date){
			sb.append("'" + obj.toString()+"'");
		} else {
			sb.append(obj.toString());
		}
		return sb.toString();
	}
1192420
def _handle_dot(self):
        
        self.printer = DotPrinter(self.todolist)

        try:
            arg = self.argument(1)
            todo = self.todolist.todo(arg)
            arg = self.argument(1)
            todos = set([self.todolist.todo(arg)])
            todos |= set(self.todolist.children(todo))
            todos |= set(self.todolist.parents(todo))
            todos = sorted(todos, key=lambda t: t.text())

            self.out(self.printer.print_list(todos))
        except InvalidTodoException:
            self.error("Invalid todo number given.")
        except InvalidCommandArgument:
            self.error(self.usage())
700897
def pretty_print(self, carrot=True):
        
        output = ['\n']
        output.extend([line.pretty_print() for line in
                       self.partpyobj.get_surrounding_lines(1, 0)])

        if carrot:
            output.append('\n' +
                          (' ' * (self.partpyobj.col + 5)) + '^' + '\n')
        if self.partpymsg:
            output.append(self.partpymsg)

        return ''.join(output)
1217511
def pretty_print_device(device):
    """"""
    logging.info('Device Instance ID: %s' % device['id'])
    if 'nickname' in device:
        logging.info('    Nickname: %s' % device['nickname'])
    if 'modelId' in device:
        logging.info('    Model: %s' % device['modelId'])
    logging.info('')
1062859
def prettyprint(self):
        """"""
        return json.dumps(self.asJSON(), sort_keys=True, indent=4, separators=(',', ': '))
1288448
def format(self, obj, context, maxlevels, level):  # pylint: disable=arguments-differ
        
        if isinstance(obj, basestring) and "://" in fmt.to_unicode(obj):
            obj = mask_keys(obj)
        return pprint.PrettyPrinter.format(self, obj, context, maxlevels, level)
276841
def _print(self):
        
        if self.printer is None:
            # create a standard printer with some filters
            indent = config().list_indent()
            final_format = ' ' * indent + self.format

            filters = []
            filters.append(PrettyPrinterFormatFilter(self.todolist, final_format))

            self.printer = pretty_printer_factory(self.todolist, filters)

        try:
            if self.group_expression:
                self.out(self.printer.print_groups(self._view().groups))
            else:
                self.out(self.printer.print_list(self._view().todos))
        except ListFormatError:
            self.error('Error while parsing format string (list_format config'
                       ' option or -F)')
568993
def print_results(self):
        """"""
        # Updates
        if self.package_data.get('updates'):
            print('\n{}{}Updates:'.format(c.Style.BRIGHT, c.Fore.BLUE))
            for p in self.package_data['updates']:
                print(
                    '{!s:<20}{}{} {!s:<50}'.format(
                        p.get('action'), c.Style.BRIGHT, c.Fore.CYAN, p.get('output')
                    )
                )

        # Packaging
        print('\n{}{}Package:'.format(c.Style.BRIGHT, c.Fore.BLUE))
        for p in self.package_data['package']:
            if isinstance(p.get('output'), list):
                n = 5
                list_data = p.get('output')
                print(
                    '{!s:<20}{}{} {!s:<50}'.format(
                        p.get('action'), c.Style.BRIGHT, c.Fore.CYAN, ', '.join(p.get('output')[:n])
                    )
                )
                del list_data[:n]
                for data in [
                    list_data[i : i + n] for i in range(0, len(list_data), n)  # noqa: E203
                ]:
                    print(
                        '{!s:<20}{}{} {!s:<50}'.format(
                            '', c.Style.BRIGHT, c.Fore.CYAN, ', '.join(data)
                        )
                    )

            else:
                print(
                    '{!s:<20}{}{} {!s:<50}'.format(
                        p.get('action'), c.Style.BRIGHT, c.Fore.CYAN, p.get('output')
                    )
                )

        # Bundle
        if self.package_data.get('bundle'):
            print('\n{}{}Bundle:'.format(c.Style.BRIGHT, c.Fore.BLUE))
            for p in self.package_data['bundle']:
                print(
                    '{!s:<20}{}{} {!s:<50}'.format(
                        p.get('action'), c.Style.BRIGHT, c.Fore.CYAN, p.get('output')
                    )
                )

        # ignore exit code
        if not self.args.ignore_validation:
            print('\n')  # separate errors from normal output
            # print all errors
            for error in self.package_data.get('errors'):
                print('{}{}'.format(c.Fore.RED, error))
                self.exit_code = 1
644664
def pretty(self, obj=None, display=True):
        
        ret = self._format_obj(obj if obj is not None else self.obj)
        if display:
            print(ret)
        else:
            return ret
572806
def printer(self):
        """"""
        for key in self.statediag:
            if key.trans is not None and len(key.trans) > 0:
                print '****** ' + repr(key.id) + '(' + repr(key.type)\
                      + ' on sym ' + repr(key.sym) + ') ******'
                print key.trans