(self, largs, rargs, values)
_process_args(largs : [string],
                         rargs : [string],
                         values : Values)

        Process command-line arguments and populate 'values', consuming
        options and arguments from 'rargs'.  If 'allow_interspersed_args' is
        false, stop at the first non-option argument.  If true, accumulate any
        interspersed non-option arguments in 'largs'.
_process_args(largs : [string],
                         rargs : [string],
                         values : Values)
_process_args ( largs : [ string ] rargs : [ string ] values : Values )
def _process_args(self, largs, rargs, values):
        """_process_args(largs : [string],
                         rargs : [string],
                         values : Values)

        Process command-line arguments and populate 'values', consuming
        options and arguments from 'rargs'.  If 'allow_interspersed_args' is
        false, stop at the first non-option argument.  If true, accumulate any
        interspersed non-option arguments in 'largs'.
        """
        while rargs:
            arg = rargs[0]
            # We handle bare "--" explicitly, and bare "-" is handled by the
            # standard arg handler since the short arg case ensures that the
            # len of the opt string is greater than 1.
            if arg == "--":
                del rargs[0]
                return
            elif arg[0:2] == "--":
                # process a single long option (possibly with value(s))
                self._process_long_opt(rargs, values)
            elif arg[:1] == "-" and len(arg) > 1:
                # process a cluster of short options (possibly with
                # value(s) for the last one only)
                self._process_short_opts(rargs, values)
            elif self.allow_interspersed_args:
                largs.append(arg)
                del rargs[0]
            else:
                return
def _process_args ( self , largs , rargs , values ) : while rargs : arg = rargs [ 0 ] # We handle bare "--" explicitly, and bare "-" is handled by the # standard arg handler since the short arg case ensures that the # len of the opt string is greater than 1. if arg == "--" : del rargs [ 0 ] return elif arg [ 0 : 2 ] == "--" : # process a single long option (possibly with value(s)) self . _process_long_opt ( rargs , values ) elif arg [ : 1 ] == "-" and len ( arg ) > 1 : # process a cluster of short options (possibly with # value(s) for the last one only) self . _process_short_opts ( rargs , values ) elif self . allow_interspersed_args : largs . append ( arg ) del rargs [ 0 ] else : return