Prints a repr of the object including any applied options.

        Args:
            show_defaults: Whether to include default options
193825
def info(self, show_defaults=False):
        
        pprinter = PrettyPrinter(show_options=True, show_defaults=show_defaults)
        print(pprinter.pprint(self._obj))
779905
def show_info(self):
        
        bytecode._PrintSubBanner("Method Information")
        bytecode._PrintDefault("%s->%s%s [access_flags=%s]\n" % (
            self.get_class_name(), self.get_name(), self.get_descriptor(),
            self.get_access_flags_string()))
294753
def show(self):
        
        print("StringBlock(stringsCount=0x%x, "
              "stringsOffset=0x%x, "
              "stylesCount=0x%x, "
              "stylesOffset=0x%x, "
              "flags=0x%x"
              ")" % (self.stringCount,
                     self.stringsOffset,
                     self.styleCount,
                     self.stylesOffset,
                     self.flags))

        if self.stringCount > 0:
            print()
            print("String Table: ")
            for i, s in enumerate(self):
                print("{:08d} {}".format(i, repr(s)))

        if self.styleCount > 0:
            print()
            print("Styles Table: ")
            for i in range(self.styleCount):
                print("{:08d} {}".format(i, repr(self.getStyle(i))))
187843
def do_show(self, repo):
        '''
        
        '''
        self.abort_on_nonexisting_effective_repo(repo, 'show')

        repo = self.network.get_repo(repo)
        repo.print_attributes()
662875
def print_options(self):
        
        summary = []
        for opt_name, opt in self.options.items():
            if opt.hidden:
                continue
            summary.append(opt.summary())
        print("\n".join(summary))
302991
def set_defaults(self, **defaults):
        
        try:
            defaults_items = defaults.iteritems()
        except AttributeError:
            defaults_items = defaults.items()
        for key, val in defaults_items:
            if key not in self.args.keys():
                self.args[key] = val
339263
def default(self, obj):
        
        if hasattr(obj, '_reprJSON'):
            return obj._reprJSON()
        #Let the base class default method raise the TypeError
        return json.JSONEncoder.default(self, obj)
806678
def url_defaults(self, func: Callable, name: AppOrBlueprintKey=None) -> Callable:
        
        self.url_default_functions[name].append(func)
        return func
1063425
def defaults(self, *args):
        
        ns = self.Namespace
        ns.obj = self.obj

        def by(source, *ar):
            for i, prop in enumerate(source):
                if prop not in ns.obj:
                    ns.obj[prop] = source[prop]

        _.each(args, by)

        return self._wrap(ns.obj)
375031
def _print_enum_opt(self, option, choices):
        
        for key in choices:
            if key == self.conf[option]:
                print("* %s" % key)
            else:
                print("  %s" % key)
831248
def repos(self):
        
        def_cnt, cus_cnt = 0, 0
        print("")
        self.msg.template(78)
        print("{0}{1}{2}{3}{4}{5}{6}".format(
            "| Repo id", " " * 2,
            "Repo URL", " " * 44,
            "Default", " " * 3,
            "Status"))
        self.msg.template(78)
        for repo_id, repo_URL in sorted(self.all_repos.iteritems()):
            status, COLOR = "disabled", self.meta.color["RED"]
            default = "yes"
            if len(repo_URL) > 49:
                repo_URL = repo_URL[:48] + "~"
            if repo_id in self.meta.repositories:
                def_cnt += 1
                status, COLOR = "enabled", self.meta.color["GREEN"]
            if repo_id not in self.meta.default_repositories:
                cus_cnt += 1
                default = "no"
            print("  {0}{1}{2}{3}{4}{5}{6}{7:>8}{8}".format(
                repo_id, " " * (9 - len(repo_id)),
                repo_URL, " " * (52 - len(repo_URL)),
                default, " " * (8 - len(default)),
                COLOR, status, self.meta.color["ENDC"]))

        print("\nRepositories summary")
        print("=" * 79)
        print("{0}{1}/{2} enabled default repositories and {3} custom.".format(
            self.meta.color["GREY"], def_cnt, len(self.all_repos), cus_cnt))
        print("Edit the file '/etc/slpkg/repositories.conf' for enable "
              "and disable default\nrepositories or run 'slpkg "
              "repo-enable' command.\n{0}".format(self.meta.color["ENDC"]))
        raise SystemExit()
79109
public String printDefaultValue() {
        if (setter instanceof Getter) {
            Getter getter = (Getter)setter;
            List<T> defaultValues = getter.getValueList();
            if (defaultValues != null && !defaultValues.isEmpty()) {
                StringBuilder buf = new StringBuilder();
                if (defaultValues.size()>1) {
                    for (T v : defaultValues) {
                        buf.append( buf.length()==0 ? '[' : ',' );
                        buf.append(print(v));
                    }
                    buf.append(']');
                } else {
                    buf.append(print(defaultValues.get(0)));
                }
                return buf.toString();
            }
        }
        return null;
    }
1063261
def _show(self, res, err, prefix='', colored=False):
        

        if self.kind is 'local':
            what = res if not err else err
            print(what)
            return

        if self.kind is 'remote':
            if colored:
                red, green, reset = Fore.RED, Fore.GREEN, Fore.RESET
            else:
                red = green = reset = ''
            if err:
                what = prefix + red + 'remote err: {}'.format(err) + reset
            else:
                what = prefix + green + str(res) + reset
            print(what)
357182
def _show_or_dump(self, dump=False, indent=3,
                      lvl="", label_lvl="", first_call=True):
        
        ct = AnsiColorTheme() if dump else conf.color_theme
        s = "%s%s %s %s \n" % (label_lvl, ct.punct("###["),
                               ct.layer_name(self.name), ct.punct("]###"))
        for f in self.fields_desc[:-1]:
            ncol = ct.field_name
            vcol = ct.field_value
            fvalue = self.getfieldval(f.name)
            begn = "%s  %-10s%s " % (label_lvl + lvl, ncol(f.name),
                                     ct.punct("="),)
            reprval = f.i2repr(self, fvalue)
            if isinstance(reprval, str):
                reprval = reprval.replace("\n", "\n" + " " * (len(label_lvl) +
                                                              len(lvl) +
                                                              len(f.name) +
                                                              4))
            s += "%s%s\n" % (begn, vcol(reprval))
        f = self.fields_desc[-1]
        ncol = ct.field_name
        vcol = ct.field_value
        fvalue = self.getfieldval(f.name)
        begn = "%s  %-10s%s " % (label_lvl + lvl, ncol(f.name), ct.punct("="),)
        reprval = f.i2repr(self, fvalue)
        if isinstance(reprval, str):
            reprval = reprval.replace("\n", "\n" + " " * (len(label_lvl) +
                                                          len(lvl) +
                                                          len(f.name) +
                                                          4))
        s += "%s%s\n" % (begn, vcol(reprval))
        if self.payload:
            s += self.payload._show_or_dump(dump=dump, indent=indent,
                                            lvl=lvl + (" " * indent * self.show_indent),  # noqa: E501
                                            label_lvl=label_lvl, first_call=False)  # noqa: E501

        if first_call and not dump:
            print(s)
        else:
            return s
1071920
function replWriter(output) {
  if (output){
    if (output.constructor && output.constructor.name !== "String"){
      return util.inspect(output, {colors:true}) + '\n';
    }
  }

  return output + '\n';
}
164011
def parse_show(prs):
    
    prs_show = prs.add_parser('show',
                              help='show converted JSON')
    set_option(prs_show, 'infile')
    prs_show.set_defaults(func=show)
520197
def cmd_config_show(option, show_keys):
    

    habucfg = loadcfg()

    if not show_keys:
        for key in habucfg.keys():
            if 'KEY' in key:
                habucfg[key] = '*************'

    print(json.dumps(habucfg, indent=4, sort_keys=True, default=str))