BigBrotherBot v1.8.0
System Development Information for the BigBrotherBot project.

b3::lib::argparse::ArgumentParser Class Reference

Inheritance diagram for b3::lib::argparse::ArgumentParser:
b3::lib::argparse::_AttributeHolder b3::lib::argparse::_ActionsContainer

List of all members.

Public Member Functions

def __init__
def add_subparsers
def parse_args
def parse_known_args
def convert_arg_line_to_args
def format_usage
def format_help
def format_version
def print_usage
def print_help
def print_version
def exit
def error

Public Attributes

 prog
 usage
 epilog
 version
 formatter_class
 fromfile_prefix_chars
 add_help

Private Member Functions

def _get_kwargs
def _add_action
def _get_optional_actions
def _get_positional_actions
def _parse_known_args
def _read_args_from_files
def _match_argument
def _match_arguments_partial
def _parse_optional
def _get_option_tuples
def _get_nargs_pattern
def _get_values
def _get_value
def _check_value
def _get_formatter
def _print_message

Private Attributes

 _positionals
 _optionals
 _subparsers

Detailed Description

Object for parsing command line strings into Python objects.

Keyword Arguments:
    - prog -- The name of the program (default: sys.argv[0])
    - usage -- A usage message (default: auto-generated from arguments)
    - description -- A description of what the program does
    - epilog -- Text following the argument descriptions
    - parents -- Parsers whose arguments should be copied into this one
    - formatter_class -- HelpFormatter class for printing help messages
    - prefix_chars -- Characters that prefix optional arguments
    - fromfile_prefix_chars -- Characters that prefix files containing
        additional arguments
    - argument_default -- The default value for all arguments
    - conflict_handler -- String indicating how to handle conflicts
    - add_help -- Add a -h/-help option

Constructor & Destructor Documentation

def b3::lib::argparse::ArgumentParser::__init__ (   self,
  prog = None,
  usage = None,
  description = None,
  epilog = None,
  version = None,
  parents = [],
  formatter_class = HelpFormatter,
  prefix_chars = '-',
  fromfile_prefix_chars = None,
  argument_default = None,
  conflict_handler = 'error',
  add_help = True 
)

Member Function Documentation

def b3::lib::argparse::ArgumentParser::_add_action (   self,
  action 
) [private]
def b3::lib::argparse::ArgumentParser::_check_value (   self,
  action,
  value 
) [private]
def b3::lib::argparse::ArgumentParser::_get_formatter (   self) [private]
def b3::lib::argparse::ArgumentParser::_get_kwargs (   self) [private]
def b3::lib::argparse::ArgumentParser::_get_nargs_pattern (   self,
  action 
) [private]
def b3::lib::argparse::ArgumentParser::_get_option_tuples (   self,
  option_string 
) [private]
def b3::lib::argparse::ArgumentParser::_get_optional_actions (   self) [private]
def b3::lib::argparse::ArgumentParser::_get_positional_actions (   self) [private]
def b3::lib::argparse::ArgumentParser::_get_value (   self,
  action,
  arg_string 
) [private]
def b3::lib::argparse::ArgumentParser::_get_values (   self,
  action,
  arg_strings 
) [private]
def b3::lib::argparse::ArgumentParser::_match_argument (   self,
  action,
  arg_strings_pattern 
) [private]
def b3::lib::argparse::ArgumentParser::_match_arguments_partial (   self,
  actions,
  arg_strings_pattern 
) [private]
def b3::lib::argparse::ArgumentParser::_parse_known_args (   self,
  arg_strings,
  namespace 
) [private]
def b3::lib::argparse::ArgumentParser::_parse_optional (   self,
  arg_string 
) [private]
def b3::lib::argparse::ArgumentParser::_print_message (   self,
  message,
  file = None 
) [private]
def b3::lib::argparse::ArgumentParser::_read_args_from_files (   self,
  arg_strings 
) [private]
def b3::lib::argparse::ArgumentParser::add_subparsers (   self,
  kwargs 
)
def b3::lib::argparse::ArgumentParser::convert_arg_line_to_args (   self,
  arg_line 
)
def b3::lib::argparse::ArgumentParser::error (   self,
  message 
)
error(message: string)

Prints a usage message incorporating the message to stderr and
exits.

If you override this in a subclass, it should not return -- it
should either exit or raise an exception.
def b3::lib::argparse::ArgumentParser::exit (   self,
  status = 0,
  message = None 
)
def b3::lib::argparse::ArgumentParser::format_help (   self)
def b3::lib::argparse::ArgumentParser::format_usage (   self)
def b3::lib::argparse::ArgumentParser::format_version (   self)
def b3::lib::argparse::ArgumentParser::parse_args (   self,
  args = None,
  namespace = None 
)
def b3::lib::argparse::ArgumentParser::parse_known_args (   self,
  args = None,
  namespace = None 
)
def b3::lib::argparse::ArgumentParser::print_help (   self,
  file = None 
)
def b3::lib::argparse::ArgumentParser::print_usage (   self,
  file = None 
)
def b3::lib::argparse::ArgumentParser::print_version (   self,
  file = None 
)

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties