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

Class Option

Known Subclasses:
DeOption

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

Method Summary
  __init__(self, *opts, **attrs)
  __str__(self)
  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 Variable Summary
tuple ACTIONS = ('store', 'store_const', 'store_true', 'store_...
tuple ALWAYS_TYPED_ACTIONS = ('store', 'append')
list ATTRS = ['action', 'type', 'dest', 'default', 'nargs', '...
list CHECK_METHODS = [<function _check_action at 0x5c7570>, <...
tuple STORE_ACTIONS = ('store', 'store_const', 'store_true', '...
dict TYPE_CHECKER = {'int': <function check_builtin at 0x5b93...
tuple TYPED_ACTIONS = ('store', 'append', 'callback')
tuple TYPES = ('string', 'int', 'long', 'float', 'complex', 'c...

Class Variable Details

ACTIONS

Type:
tuple
Value:
('store',
 'store_const',
 'store_true',
 'store_false',
 'append',
 'count',
 'callback',
 'help',
...                                                                    

ALWAYS_TYPED_ACTIONS

Type:
tuple
Value:
('store', 'append')                                                    

ATTRS

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

CHECK_METHODS

Type:
list
Value:
[<function _check_action at 0x5c7570>,
 <function _check_type at 0x5c75b0>,
 <function _new_check_choice at 0x5b51b0>,
 <function _check_dest at 0x5c7630>,
 <function _check_const at 0x5c7670>,
 <function _check_nargs at 0x5c76b0>,
 <function _check_callback at 0x5c76f0>]                               

STORE_ACTIONS

Type:
tuple
Value:
('store', 'store_const', 'store_true', 'store_false', 'append', 'count\
')                                                                     

TYPE_CHECKER

Type:
dict
Value:
{'choice': <function check_choice at 0x5c73f0>,
 'complex': <function check_builtin at 0x5b9330>,
 'float': <function check_builtin at 0x5b9330>,
 'int': <function check_builtin at 0x5b9330>,
 'long': <function check_builtin at 0x5b9330>}                         

TYPED_ACTIONS

Type:
tuple
Value:
('store', 'append', 'callback')                                        

TYPES

Type:
tuple
Value:
('string', 'int', 'long', 'float', 'complex', 'choice')                

Generated by Epydoc 2.1 on http://epydoc.sf.net