Package logilab :: Package common :: Module optik_ext :: Class Option
[frames] | no frames]

Class Option

source code

optparse.Option --+
                  |
                 Option

override optik.Option to add some new option types
    

Instance Methods
 
__init__(self, *opts, **attrs) source code
 
process(self, opt, value, values, parser) source code

Inherited from optparse.Option: __repr__, __str__, check_value, convert_value, get_opt_string, take_action, takes_value

Class Variables
  ATTRS = ['action', 'type', 'dest', 'default', 'nargs', 'const'...
  TYPES = ('string', 'int', 'long', 'float', 'complex', 'choice'...
  TYPE_CHECKER = {'bytes': <function check_bytes at 0x407fd6f4>,...

Inherited from optparse.Option: ACTIONS, ALWAYS_TYPED_ACTIONS, CHECK_METHODS, CONST_ACTIONS, STORE_ACTIONS, TYPED_ACTIONS

Method Details

__init__(self, *opts, **attrs)
(Constructor)

source code 
Overrides: optparse.Option.__init__

process(self, opt, value, values, parser)

source code 
Overrides: optparse.Option.process

Class Variable Details

ATTRS

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

TYPES

Value:
('string',
 'int',
 'long',
 'float',
 'complex',
 'choice',
 'regexp',
 'csv',
...

TYPE_CHECKER

Value:
{'bytes': <function check_bytes at 0x407fd6f4>,
 'choice': <function check_choice at 0x40436bfc>,
 'color': <function check_color at 0x407fd684>,
 'complex': <function check_builtin at 0x40436bc4>,
 'csv': <function check_csv at 0x407fd534>,
 'file': <function check_file at 0x407fd614>,
 'float': <function check_builtin at 0x40436bc4>,
 'int': <function check_builtin at 0x40436bc4>,
...