(self, remaining)
return args
Process command line options.
Process command line options.
Process command line options .
def _parse_args(self, remaining):
        """Process command line options."""
        # set arguments
        known = list(ARGUMENTS.keys()) + list(range(NUM_POSITIONAL))
        args = {d: remaining[d] for d in remaining if d in known}
        not_recognised = {d: remaining[d] for d in remaining if d not in known}
        for d in not_recognised:
            if not_recognised[d]:
                if isinstance(d, int):
                    logging.warning(
                        u'Ignored surplus positional command-line argument #%s: `%s`', d, not_recognised[d]
                    )
                else:
                    logging.warning(
                        u'Ignored unrecognised command-line argument `%s=%s`', d, not_recognised[d]
                    )
            else:
                logging.warning(u'Ignored unrecognised command-line argument `%s`', d)
        return args
def _parse_args ( self , remaining ) : # set arguments known = list ( ARGUMENTS . keys ( ) ) + list ( range ( NUM_POSITIONAL ) ) args = { d : remaining [ d ] for d in remaining if d in known } not_recognised = { d : remaining [ d ] for d in remaining if d not in known } for d in not_recognised : if not_recognised [ d ] : if isinstance ( d , int ) : logging . warning ( u'Ignored surplus positional command-line argument #%s: `%s`' , d , not_recognised [ d ] ) else : logging . warning ( u'Ignored unrecognised command-line argument `%s=%s`' , d , not_recognised [ d ] ) else : logging . warning ( u'Ignored unrecognised command-line argument `%s`' , d ) return args