Print Automate help if no parameter is given. Otherwise,
           act as pydoc.help()
509795
def help(self, *args, **kwargs):
        """"""
        if len(args) > 0 or len(kwargs) > 0:
            import pydoc

            pydoc.help(*args, **kwargs)
        else:
            hstr = helpstr
            for i in hstr.split("\n"):
                self.logger.info(i)
        return True
482102
def print_help(self, *args, **kwargs):
        
        if self._command is not None and self._command.session.allow_pager:
            desc = 'Help\: %s' % '-'.join(self.prog.split())
            pager_kwargs = self._command.get_pager_spec()
            with paging.pager_redirect(desc, **pager_kwargs):
                return super().print_help(*args, **kwargs)
        else:
                return super().print_help(*args, **kwargs)
943439
def help(self, command=None):
        
        cmd = 'help'
        if command: cmd += ' %s' % command
        return self.fetch(cmd)[1]
554567
def do_help(self, argv):
        
        if argv[1:]:
            for arg in argv[1:]:
                if self._do_one_help(arg):
                    break
        else:
            # If bare 'help' is called, print this class's doc
            # string (if it has one).
            doc = self._doc_to_help(self.__class__)
            if doc:
                sys.stdout.write(doc + '\n')
                sys.stdout.flush()
570820
def callbackShortHelp(option, opt, value, parser):
    ''''''
    # clear usage and description
    parser.set_description(None)
    # parser.set_usage(None)
    # output help
    parser.print_help()
    # exit
    parser.exit()
1263550
def run_command(self, args):
        
        parsed_args = self.parser.parse_args(args)
        if hasattr(parsed_args, 'func'):
            parsed_args.func(parsed_args)
        else:
            self.parser.print_help()
789217
def help(module=None, *args):
    '''
    
    '''
    if not module:
        raise CommandExecutionError('Please tell me what module you want to have helped with. '
                                    'Or call "ansible.list" to know what is available.')
    try:
        module = _resolver.load_module(module)
    except (ImportError, LoaderError) as err:
        raise CommandExecutionError('Module "{0}" is currently not functional on your system.'.format(module))

    doc = {}
    ret = {}
    for docset in module.DOCUMENTATION.split('---'):
        try:
            docset = salt.utils.yaml.safe_load(docset)
            if docset:
                doc.update(docset)
        except Exception as err:
            log.error("Error parsing doc section: %s", err)
    if not args:
        if 'description' in doc:
            description = doc.get('description') or ''
            del doc['description']
            ret['Description'] = description
        ret['Available sections on module "{}"'.format(module.__name__.replace('ansible.modules.', ''))] = doc.keys()
    else:
        for arg in args:
            info = doc.get(arg)
            if info is not None:
                ret[arg] = info

    return ret
362551
def check_help():
    
    # know arguments
    know = set(('-h', '--help', '-v', '--version'))
    # arguments
    args = set(sys.argv[1:])
    # returns True if there is at least one known argument in arguments
    return len(know.intersection(args)) > 0
547530
def help(context, command):
    ''''''
    if command:
        cmd = cli.commands.get(command, None)
        if cmd:
            context.info_name = command
            click.echo(cmd.get_help(context))
        else:
            raise click.ClickException('no command: %s' % command)
    else:
        click.echo(cli.get_help(context))
865866
def do_parameter(self,args):
        """"""
        parser = CommandArgumentParser("parameter")
        parser.add_argument(dest="id",help="Parameter to print")
        args = vars(parser.parse_args(args))
        
        print "printing parameter {}".format(args['id'])
        try:
            index = int(args['id'])            
            parameter = self.wrappedStack['resourcesByTypeName']['parameters'][index]
        except ValueError:
            parameter = self.wrappedStack['resourcesByTypeName']['parameters'][args['id']]

        print(parameter.resource_status)
990545
private void printHelp(Options o, boolean exit, OutputStream os) {
        final PrintWriter pw = new PrintWriter(os);
        final String syntax = getUsage();
        String header = getApplicationName();
        header = header.concat("\nOptions:");
        HelpFormatter hf = new HelpFormatter();
        hf.printHelp(pw, 80, syntax, header, o, 2, 2, null, false);
        pw.flush();
        if (exit) {
            bail(SUCCESS);
        }

    }
1374547
def do_help(self, line):
        
        # We provide a help function so that we can trim the leading spaces
        # from the docstrings. The builtin help function doesn't do that.
        if not line:
            cmd.Cmd.do_help(self, line)
            self.print(EXIT_STR)
            return
        parser = self.create_argparser(line)
        if parser:
            parser.print_help()
            return
        try:
            doc = getattr(self, 'do_' + line).__doc__
            if doc:
                self.print("%s" % trim(doc))
                return
        except AttributeError:
            pass
        self.print(str(self.nohelp % (line,)))
858877
def perform_command(self):
        
        if len(self.actual_arguments) < 2:
            return self.print_help()
        mode = self.actual_arguments[0]

        validator = Validator(rconf=self.rconf, logger=self.logger)
        if mode == u"config":
            config_file_path = self.actual_arguments[1]
            config_txt = None
            if config_file_path.lower().endswith(u".txt"):
                config_txt = True
            elif config_file_path.lower().endswith(u".xml"):
                config_txt = False
            else:
                return self.print_help()
            if not self.check_input_file(config_file_path):
                return self.ERROR_EXIT_CODE
            contents = gf.read_file_bytes(config_file_path)
            if contents is None:
                return self.ERROR_EXIT_CODE
            if config_txt:
                result = validator.check_config_txt(contents)
                msg = u"TXT configuration"
            else:
                result = validator.check_config_xml(contents)
                msg = "XML configuration"
        elif mode == u"container":
            container_path = self.actual_arguments[1]
            result = validator.check_container(container_path)
            msg = "container"
        elif mode == u"job":
            config_string = self.actual_arguments[1]
            result = validator.check_configuration_string(config_string, is_job=True)
            msg = u"job configuration string"
        elif mode == u"task":
            config_string = self.actual_arguments[1]
            result = validator.check_configuration_string(config_string, is_job=False, external_name=True)
            msg = u"task configuration string"
        elif mode == u"wizard":
            if (len(self.actual_arguments) < 3) or (self.actual_arguments[2].startswith(u"-")):
                return self.print_help()
            config_string = self.actual_arguments[1]
            container_path = self.actual_arguments[2]
            if not self.check_input_file(container_path):
                return self.ERROR_EXIT_CODE
            result = validator.check_container(container_path, config_string=config_string)
            msg = "container with configuration string from wizard"
        else:
            return self.print_help()

        if result.passed:
            self.print_success(u"Valid %s" % msg)
            for warning in result.warnings:
                self.print_warning(u"%s" % warning)
            return self.NO_ERROR_EXIT_CODE
        else:
            self.print_error(u"Invalid %s" % msg)
            for error in result.errors:
                self.print_error(u"%s" % error)

        return self.ERROR_EXIT_CODE
951059
def print_help(self, file=None):
        
        output = file or self.stderr
        CustomStderrOptionParser.print_help(self, output)
        output.write("\nCommands:\n")
        for command_def in self.command_definitions.values():
            command_def.opt_parser.print_help(output)
            output.write("\n")
1087533
def show_help(fd=sys.stdout):
    '''
    
    '''
    with Modules() as m:
        fd.write(m.help())
205936
def do_help(self, line):
        
        command, = self._split_args(line, 0, 1)
        if command is None:
            return self._print_help()
        cmd.Cmd.do_help(self, line)
216189
def help_function(self, command=None):
        
        if command:
            return self.registered[command].get(
                'description', 'No help available'
            )
        return ', '.join(sorted(self.registered))