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

Class 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)
 
__repr__(self)
 
__str__(self)
 
_check_action(self)
 
_check_callback(self)
 
_check_choice(self)
 
_check_const(self)
 
_check_dest(self)
 
_check_nargs(self)
 
_check_opt_strings(self, opts)
 
_check_type(self)
 
_set_attrs(self, attrs)
 
_set_opt_strings(self, opts)
 
check_value(self, opt, value)
 
convert_value(self, opt, value)
 
get_opt_string(self)
 
process(self, opt, value, values, parser)
 
take_action(self, action, dest, opt, value, values, parser)
 
takes_value(self)
Class Variables [hide private]
  ACTIONS = ('store', 'store_const', 'store_true', 'store_false'...
  ALWAYS_TYPED_ACTIONS = ('store', 'append')
  ATTRS = ['action', 'type', 'dest', 'default', 'nargs', 'const'...
  CHECK_METHODS = [<function _check_action at 0x7f4fe2416500>, <...
  CONST_ACTIONS = ('store_const', 'append_const')
  STORE_ACTIONS = ('store', 'store_const', 'store_true', 'store_...
  TYPED_ACTIONS = ('store', 'append', 'callback')
  TYPES = ('string', 'int', 'long', 'float', 'complex', 'choice')
  TYPE_CHECKER = {'choice': <function check_choice at 0x7f4fe241...
Class Variable Details [hide private]

ACTIONS

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

ATTRS

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

CHECK_METHODS

Value:
[<function _check_action at 0x7f4fe2416500>,
 <function _check_type at 0x7f4fe2416578>,
 <function _check_choice at 0x7f4fe24165f0>,
 <function _check_dest at 0x7f4fe2416668>,
 <function _check_const at 0x7f4fe24166e0>,
 <function _check_nargs at 0x7f4fe2416758>,
 <function _check_callback at 0x7f4fe24167d0>]

STORE_ACTIONS

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

TYPE_CHECKER

Value:
{'choice': <function check_choice at 0x7f4fe2416230>,
 'complex': <function check_builtin at 0x7f4fe24161b8>,
 'float': <function check_builtin at 0x7f4fe24161b8>,
 'int': <function check_builtin at 0x7f4fe24161b8>,
 'long': <function check_builtin at 0x7f4fe24161b8>}