(self, opt_name, opt_list, consumed, consumed_params)
return None
Get command line parameters
        The CLI of udocker has 3 parts, first options, second command name
        third everything after the command name. The params are the arguments
        that do not start with - and may exist after the options.
Get command line parameters
        The CLI of udocker has 3 parts, first options, second command name
        third everything after the command name. The params are the arguments
        that do not start with - and may exist after the options.
Get command line parameters The CLI of udocker has 3 parts first options second command name third everything after the command name . The params are the arguments that do not start with - and may exist after the options .
def _get_param(self, opt_name, opt_list, consumed, consumed_params):
        """Get command line parameters
        The CLI of udocker has 3 parts, first options, second command name
        third everything after the command name. The params are the arguments
        that do not start with - and may exist after the options.
        """
        all_args = []
        pos = 0
        param_num = 0
        skip_opts = True
        while pos < len(opt_list):
            if opt_list[pos] == "-":
                skip_opts = False

            if not (skip_opts and
                    (opt_list[pos].startswith('-') or pos in consumed)):
                skip_opts = False
                param_num += 1
                if opt_name[1:] == str(param_num):
                    consumed_params.append(pos)
                    return opt_list[pos]

                if opt_name[1] == '*':
                    consumed_params.append(pos)
                    all_args.append(opt_list[pos])
                elif opt_name[1] == '+' and param_num > 0:
                    consumed_params.append(pos)
                    all_args.append(opt_list[pos])
            pos += 1

        if opt_name[1] == '*':
            return all_args

        if opt_name[1] == '+':
            return all_args[1:]

        return None
def _get_param ( self , opt_name , opt_list , consumed , consumed_params ) : all_args = [ ] pos = 0 param_num = 0 skip_opts = True while pos < len ( opt_list ) : if opt_list [ pos ] == "-" : skip_opts = False if not ( skip_opts and ( opt_list [ pos ] . startswith ( '-' ) or pos in consumed ) ) : skip_opts = False param_num += 1 if opt_name [ 1 : ] == str ( param_num ) : consumed_params . append ( pos ) return opt_list [ pos ] if opt_name [ 1 ] == '*' : consumed_params . append ( pos ) all_args . append ( opt_list [ pos ] ) elif opt_name [ 1 ] == '+' and param_num > 0 : consumed_params . append ( pos ) all_args . append ( opt_list [ pos ] ) pos += 1 if opt_name [ 1 ] == '*' : return all_args if opt_name [ 1 ] == '+' : return all_args [ 1 : ] return None