def reparse_local_options(self):
        """
        Re-parse the leftover command-line options stored
        in self.largs, so that any value overridden on the
        command line is immediately available if the user turns
        around and does a GetOption() right away.
        
        We mimic the processing of the single args
        in the original OptionParser._process_args(), but here we
        allow exact matches for long-opts only (no partial
        argument names!).

        Else, this would lead to problems in add_local_option()
        below. When called from there, we try to reparse the
        command-line arguments that
          1. haven't been processed so far (self.largs), but
          2. are possibly not added to the list of options yet.
          
        So, when we only have a value for "--myargument" yet,
        a command-line argument of "--myarg=test" would set it.
        Responsible for this behaviour is the method
        _match_long_opt(), which allows for partial matches of
        the option name, as long as the common prefix appears to
        be unique.
        This would lead to further confusion, because we might want
        to add another option "--myarg" later on (see issue #2929).
        
        """
        rargs = []
        largs_restore = []
        # Loop over all remaining arguments
        skip = False
        for l in self.largs:
            if skip:
                # Accept all remaining arguments as they are
                largs_restore.append(l)
            else:
                if len(l) > 2 and l[0:2] == "--":
                    # Check long option
                    lopt = (l,)
                    if "=" in l:
                        # Split into option and value
                        lopt = l.split("=", 1)
                        
                    if lopt[0] in self._long_opt:
                        # Argument is already known
                        rargs.append('='.join(lopt))
                    else:
                        # Not known yet, so reject for now
                        largs_restore.append('='.join(lopt))
                else:
                    if l == "--" or l == "-":
                        # Stop normal processing and don't
                        # process the rest of the command-line opts
                        largs_restore.append(l)
                        skip = True
                    else:
                        rargs.append(l)
        
        # Parse the filtered list
        self.parse_args(rargs, self.values)
        # Restore the list of remaining arguments for the
        # next call of AddOption/add_local_option...
        self.largs = self.largs + largs_restore
Re-parse the leftover command-line options stored
        in self.largs, so that any value overridden on the
        command line is immediately available if the user turns
        around and does a GetOption() right away.
        
        We mimic the processing of the single args
        in the original OptionParser._process_args(), but here we
        allow exact matches for long-opts only (no partial
        argument names!).

        Else, this would lead to problems in add_local_option()
        below. When called from there, we try to reparse the
        command-line arguments that
          1. haven't been processed so far (self.largs), but
          2. are possibly not added to the list of options yet.
          
        So, when we only have a value for "--myargument" yet,
        a command-line argument of "--myarg=test" would set it.
        Responsible for this behaviour is the method
        _match_long_opt(), which allows for partial matches of
        the option name, as long as the common prefix appears to
        be unique.
        This would lead to further confusion, because we might want
        to add another option "--myarg" later on (see issue #2929).