Module optparse :: Class Option
[hide private]
[frames] | no frames]

_ClassType Option


Instance attributes:
  _short_opts : [string]
  _long_opts : [string]

  action : string
  type : string
  dest : string
  default : any
  nargs : int
  const : any
  choices : [string]
  callback : function
  callback_args : (any*)
  callback_kwargs : { string : any }
  help : string
  metavar : string

Instance Methods [hide private]
 
__init__(self, *opts, **attrs)
 
_check_opt_strings(self, opts)
 
_set_opt_strings(self, opts)
 
_set_attrs(self, attrs)
 
_check_action(self)
 
_check_type(self)
 
_check_choice(self)
 
_check_dest(self)
 
_check_const(self)
 
_check_nargs(self)
 
_check_callback(self)
 
__str__(self)
 
__repr__(self)
 
takes_value(self)
 
get_opt_string(self)
 
check_value(self, opt, value)
 
convert_value(self, opt, value)
 
process(self, opt, value, values, parser)
 
take_action(self, action, dest, opt, value, values, parser)
Class Variables [hide private]
  ATTRS = ['action', 'type', 'dest', 'default', 'nargs', 'const'...
  ACTIONS = ('store', 'store_const', 'store_true', 'store_false'...
  STORE_ACTIONS = ('store', 'store_const', 'store_true', 'store_...
  TYPED_ACTIONS = ('store', 'append', 'callback')
  ALWAYS_TYPED_ACTIONS = ('store', 'append')
  CONST_ACTIONS = ('store_const', 'append_const')
  TYPES = ('string', 'int', 'long', 'float', 'complex', 'choice')
  TYPE_CHECKER = {"int": check_builtin, "long": check_builtin, "...
  CHECK_METHODS = [_check_action, _check_type, _check_choice, _c...
Class Variable Details [hide private]

ATTRS

Value:
['action',
 'type',
 'dest',
 'default',
 'nargs',
 'const',
 'choices',
 'callback',
...

ACTIONS

Value:
('store',
 'store_const',
 'store_true',
 'store_false',
 'append',
 'append_const',
 'count',
 'callback',
...

STORE_ACTIONS

Value:
('store',
 'store_const',
 'store_true',
 'store_false',
 'append',
 'append_const',
 'count')

TYPE_CHECKER

Value:
{"int": check_builtin, "long": check_builtin, "float": check_builtin, \
"complex": check_builtin, "choice": check_choice,}

CHECK_METHODS

Value:
[_check_action, _check_type, _check_choice, _check_dest, _check_const,\
 _check_nargs, _check_callback]