Home | History | Annotate | Download | only in python2.7

Lines Matching refs:parser

14     parser = argparse.ArgumentParser(
16 parser.add_argument(
19 parser.add_argument(
22 args = parser.parse_args()
30 the parser with actions for optional and positional arguments. Then
35 there are errors with the parser's actions. Errors raised while
43 - Action -- The base class for parser actions. Typically actions are
53 RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser
78 'PARSER',
104 PARSER = 'A...'
583 elif action.nargs == PARSER:
799 def __call__(self, parser, namespace, values, option_string=None):
834 def __call__(self, parser, namespace, values, option_string=None):
857 def __call__(self, parser, namespace, values, option_string=None):
926 def __call__(self, parser, namespace, values, option_string=None):
952 def __call__(self, parser, namespace, values, option_string=None):
974 def __call__(self, parser, namespace, values, option_string=None):
993 def __call__(self, parser, namespace, values, option_string=None):
994 parser.print_help()
995 parser.exit()
1014 def __call__(self, parser, namespace, values, option_string=None):
1017 version = parser.version
1018 formatter = parser._get_formatter()
1020 parser.exit(message=formatter.format_help())
1047 nargs=PARSER,
1063 # create the parser and add it to the map
1064 parser = self._parser_class(**kwargs)
1065 self._name_parser_map[name] = parser
1066 return parser
1071 def __call__(self, parser, namespace, values, option_string=None):
1075 # set the parser name if requested
1079 # select the parser
1081 parser = self._name_parser_map[parser_name]
1084 msg = _('unknown parser %r (choices: %s)') % tup
1089 # level parser can decide what to do with them
1090 namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
1269 # if no default was supplied, use the parser-level default
1277 # create the action object, and add it to the parser
1640 # add the parser class to the arguments if it's not present
1650 # prog defaults to the usage message of this parser, skipping
1702 # default Namespace built from parser defaults
1713 # add any parser defaults that aren't present
2051 # if the option string is present in the parser, return the action
2068 # and all actions in the parser for possible interpretations
2096 # in this parser (though it might be a valid option in a subparser)
2169 elif nargs == PARSER:
2188 # for everything but PARSER, REMAINDER args, strip out first '--'
2189 if action.nargs not in [PARSER, REMAINDER]:
2225 # PARSER arguments convert all values, but check only the first
2226 elif action.nargs == PARSER: