Home | History | Annotate | Download | only in tool

Lines Matching full:option_parser

57         # option_parser can be overriden by the tool using set_option_parser
59 self.option_parser = HelpPrintingOptionParser(usage=SUPPRESS_USAGE, add_help_option=False, option_list=self.options)
62 # the tool to be able to create and modify the option_parser
64 def set_option_parser(self, option_parser):
65 self.option_parser = option_parser
71 self.option_parser.add_option(option)
105 return self.option_parser.parse_args(args)
123 help_text += self.option_parser.format_option_help(IndentedHelpFormatter())
197 self.option_parser.remove_option(option.get_opt_string())
208 self.option_parser.print_help()
279 def _add_global_options(self, option_parser):
282 option_parser.add_option(option)
290 option_parser = self._create_option_parser()
291 self._add_global_options(option_parser)
295 option_parser.error("%s is not a recognized command" % command_name)
297 command.set_option_parser(option_parser)