Print the details of a service
770930
def print_details(srv):
    
    name = srv.service_type
    box = "=" * 79
    print("{0}\n|{1:^77}|\n{0}\n".format(box, name))
    for action in srv.iter_actions():
        print(action.name)
        print("~" * len(action.name))
        print("\n  Input")
        for arg in action.in_args:
            print("    ", arg)
        print("\n  Output")
        for arg in action.out_args:
            print("    ", arg)

        print("\n\n")
67165
private void printServiceInstance(ServiceInstance instance) {
        print("\nServiceInstance\n-------------------------");
        if (instance == null) {
            print("null");
            return;
        }
        print("serviceName:  " + instance.getServiceName());
        print("status:  " + instance.getStatus());
        print("uri:  " + instance.getUri());
        print("address:  " + instance.getAddress());
        print("monitorEnabled:  " + instance.isMonitorEnabled());
        print("metadata:");
        Map<String, String> meta = instance.getMetadata();
        for (Entry<String, String> entry : meta.entrySet()) {
            print("  " + entry.getKey() + "  =>  " + entry.getValue());
        }
    }
914218
def _repr_html_(self, header=True):
        """"""
        name = adjust_name_for_printing(self.name) + "."
        names = self.parameter_names()
        desc = self._description_str
        iops = OrderedDict()
        for opname in self._index_operations:
            iop = []
            for p in self.parameters:
                iop.extend(p.get_property_string(opname))
            iops[opname] = iop

        format_spec = self._format_spec(name, names, desc, iops, False)
        to_print = []

        if header:
            to_print.append("<tr><th><b>" + '</b></th><th><b>'.join(format_spec).format(name=name, desc='value', **dict((name, name) for name in iops)) + "</b></th></tr>")

        format_spec = "<tr><td class=tg-left>" + format_spec[0] + '</td><td class=tg-right>' + format_spec[1] + '</td><td class=tg-center>' + '</td><td class=tg-center>'.join(format_spec[2:]) + "</td></tr>"
        for i in range(len(names)):
            to_print.append(format_spec.format(name=names[i], desc=desc[i], **dict((name, iops[name][i]) for name in iops)))

        style = """<style type="text/css">
.tg  {font-family:"Courier New", Courier, monospace !important;padding:2px 3px;word-break:normal;border-collapse:collapse;border-spacing:0;border-color:#DCDCDC;margin:0px auto;width:100%;}
.tg td{font-family:"Courier New", Courier, monospace !important;font-weight:bold;color:#444;background-color:#F7FDFA;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#DCDCDC;}
.tg th{font-family:"Courier New", Courier, monospace !important;font-weight:normal;color:#fff;background-color:#26ADE4;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#DCDCDC;}
.tg .tg-left{font-family:"Courier New", Courier, monospace !important;font-weight:normal;text-align:left;}
.tg .tg-center{font-family:"Courier New", Courier, monospace !important;font-weight:normal;text-align:center;}
.tg .tg-right{font-family:"Courier New", Courier, monospace !important;font-weight:normal;text-align:right;}
</style>"""
        return style + '\n' + '<table class="tg">' + '\n'.join(to_print) + '\n</table>'
681119
void printSummary() {
        System.out.printf("There are %d agents outstanding and %d phones. %d entries waiting to go.\n",
                agentsAvailable.size(), phoneNumbersAvailable.size(), delayedEvents.size());
    }
462277
def print_app_info(out=sys.stderr):
    """"""
    print("System info:", file=out)
    print(configuration.App, file=out)
    print("Python %(version)s on %(platform)s" %
                    {"version": sys.version, "platform": sys.platform}, file=out)
    stime = strtime(time.time())
    print("Local time:", stime, file=out)
    print("sys.argv", sys.argv, file=out)
760746
def print_infos(results):
    
    print('transactions: %i' % results.total_transactions)
    print('timers: %i' % results.total_timers)
    print('errors: %i' % results.total_errors)
    print('test start: %s' % results.start_datetime)
    print('test finish: %s\n' % results.finish_datetime)
157634
def write(self, fd=sys.stdout):
        '''
        '''
        print >>fd, self.header.getvalue()
        print >>fd, self.imports.getvalue()
        
        print >>fd, '# Messages ',
        for m in self.messages:
            print >>fd, m
        
        print >>fd, ''
        print >>fd, ''
        print >>fd, '# Service Skeletons'
        for k,v in self._services.items():
            print >>fd, v.classdef.getvalue()
            print >>fd, v.initdef.getvalue()
            for s in v.methods:
                print >>fd, s.getvalue()
496912
private void printDeliverables() {
        final List<Map.Entry<String, String>> pairs = readProjectFile().deliverables.stream()
                .filter(deliverable -> deliverable.id != null)
                .map(deliverable -> new AbstractMap.SimpleEntry<String, String>(deliverable.id, deliverable.name))
                .collect(Collectors.toList());
        final int length = pairs.stream()
                .map(p -> p.getKey())
                .map(String::length)
                .reduce(Integer::max)
                .orElse(0);
        for (Map.Entry<String, String> pair : pairs) {
            System.out.println(Strings.padEnd(pair.getKey(), length, ' ')
                    + (pair.getValue() != null ? ("  " + pair.getValue()) : ""));
        }
    }
272575
def get_details(self):
        
        strval = str(self.wrong_value)
        if len(strval) > self.__max_str_length_displayed__:
            return '(Actual value is too big to be printed in this message)'
        else:
            return 'Wrong value: [{}]'.format(self.wrong_value)
182604
def print_role(role, detailed=True):
    """"""
    if detailed:
        print(colors.yellow(role.get('fullname')))
    else:
        print("  Role: {0}".format(role.get('fullname')))
    if detailed:
        print("    description: {0}".format(role.get('description')))
    if 'default_attributes' in role:
        print("    default_attributes:")
        _pprint(role['default_attributes'])
    if 'override_attributes' in role:
        print("    override_attributes:")
        _pprint(role['override_attributes'])
    if detailed:
        print("    run_list: {0}".format(role.get('run_list')))
    print("")
94458
def describe_contents(self):
        
        print('======================================================================')
        print(self)
        print('Table  = ',  str(len(self.header)) + ' cols x ' + str(len(self.arr)) + ' rows')
        print('HEADER = ', self.get_header())
        print('arr    = ', self.arr[0:2])
100750
def print(self):
        
        print("TOTALS -------------------------------------------")
        print(json.dumps(self.counts, indent=4, sort_keys=True))
        if self.sub_total:
            print("\nSUB TOTALS --- based on '%s' ---------" % self.sub_total)
            print(json.dumps(self.sub_counts, indent=4, sort_keys=True))
        if self.list_blank:
            print("\nMISSING nodes for '%s':" % self.list_blank,
                  len(self.blank))
360552
def print_help(self):
        

        print('\n  %s %s' % (self._title or self._name, self._version or ''))

        if self._usage:
            print('\n  %s' % self._usage)
        else:
            cmd = self._name
            if hasattr(self, '_parent') and isinstance(self._parent, Command):
                cmd = '%s %s' % (self._parent._name, cmd)

            if self._command_list:
                usage = 'Usage: %s <command> [option]' % cmd
            else:
                usage = 'Usage: %s [option]' % cmd

            pos = ' '.join(['<%s>' % name for name in self._positional_list])
            print('\n  %s %s' % (usage, pos))

        arglen = max(len(o.name) for o in self._option_list)
        arglen += 2

        self.print_title('\n  Options:\n')
        for o in self._option_list:
            print('    %s %s' % (_pad(o.name, arglen), o.description or ''))
        print('')

        if self._command_list:
            self.print_title('  Commands:\n')
            for cmd in self._command_list:
                if isinstance(cmd, Command):
                    name = _pad(cmd._name, arglen)
                    desc = cmd._description or ''
                    print('    %s %s' % (_pad(name, arglen), desc))

            print('')

        if self._help_footer:
            print(self._help_footer)
            print('')

        return self
355400
def print_project_list_details(self, filter_auth_role, long_format):
        
        if filter_auth_role:
            projects_details = self.remote_store.get_projects_with_auth_role(auth_role=filter_auth_role)
        else:
            projects_details = self.remote_store.get_projects_details()
        if projects_details:
            for projects_detail in projects_details:
                print(self.get_project_info_line(projects_detail, long_format))
        else:
            print(NO_PROJECTS_FOUND_MESSAGE)
577161
def pretty_print(self, show_datetime=True):
        
        if show_datetime:
            return u"[%s] %s %s%s: %s" % (
                self.severity,
                gf.object_to_unicode(self.time),
                u" " * self.indentation,
                self.tag,
                self.message
            )
        return u"[%s] %s%s: %s" % (
            self.severity,
            u" " * self.indentation,
            self.tag,
            self.message
        )
273951
def _print_stream_parameters(self, values):
        """"""
        cprint("{0}".format(*values), "magenta", attrs=["bold"])
        print("{4}".format(*values))
        cprint("  available formats:   {1}".format(*values), "blue")
        cprint("  mandatory selectors: {2}".format(*values), "red")
        cprint("  optional selectors:  {3}".format(*values), "green")
        print()
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