| | |
- __builtin__.object
-
- chunk_callback
- processed_options
- show_defaults_callback
- optik.option.Option
-
- Option
- Option
- optik.option_parser.OptionParser(optik.option_parser.OptionContainer)
-
- option_parser
- option_parser
class Option(optik.option.Option) |
| | |
Data and other attributes defined here:
- TYPES = ('string', 'int', 'long', 'float', 'complex', 'choice', 'bool')
- TYPE_CHECKER = {'bool': <function check_bool at 0xcf4c80>, 'choice': <function check_choice at 0xcfda28>, 'complex': <function check_builtin at 0xcfdaa0>, 'float': <function check_builtin at 0xcfdaa0>, 'int': <function check_builtin at 0xcfdaa0>, 'long': <function check_builtin at 0xcfdaa0>}
Methods inherited from optik.option.Option:
- __init__(self, *opts, **attrs)
- __repr__ = _repr(self)
- __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)
Data and other attributes inherited from optik.option.Option:
- ACTIONS = ('store', 'store_const', 'store_true', 'store_false', 'append', 'append_const', 'count', 'callback', 'help', 'version')
- ALWAYS_TYPED_ACTIONS = ('store', 'append')
- ATTRS = ['action', 'type', 'dest', 'default', 'nargs', 'const', 'choices', 'callback', 'callback_args', 'callback_kwargs', 'help', 'metavar']
- CHECK_METHODS = [<function _check_action at 0xcfded8>, <function _check_type at 0xd00398>, <function _check_choice at 0xd00320>, <function _check_dest at 0xd002a8>, <function _check_const at 0xd00230>, <function _check_nargs at 0xd00de8>, <function _check_callback at 0xd3f938>]
- CONST_ACTIONS = ('store_const', 'append_const')
- STORE_ACTIONS = ('store', 'store_const', 'store_true', 'store_false', 'append', 'append_const', 'count')
- TYPED_ACTIONS = ('store', 'append', 'callback')
|
libtbx_option_parser = class option_parser(optik.option_parser.OptionParser) |
| | |
- Method resolution order:
- option_parser
- optik.option_parser.OptionParser
- optik.option_parser.OptionContainer
Methods defined here:
- __init__(self, usage=None, description=None, more_help=None)
- call_with_self_as_first_argument(self, callable, **kw)
- enable_chunk(self, easy_all=False)
- enable_show_defaults(self)
- format_help(self, formatter=None)
- option(self, *args, **kw)
- process(self, args=None, nargs=None, min_nargs=None, max_nargs=None)
- show_help(self, f=None)
Data and other attributes defined here:
- processed_options_type = <class 'libtbx.option_parser.processed_options'>
Methods inherited from optik.option_parser.OptionParser:
- add_option_group(self, *args, **kwargs)
- check_values(self, values, args)
- check_values(values : Values, args : [string])
-> (values : Values, args : [string])
Check that the supplied option values and leftover arguments are
valid. Returns the option values and leftover arguments
(possibly adjusted, possibly completely new -- whatever you
like). Default implementation just returns the passed-in
values; subclasses may override as desired.
- destroy(self)
- Declare that you are done with this OptionParser. This cleans up
reference cycles so the OptionParser (and all objects referenced by
it) can be garbage-collected promptly. After calling destroy(), the
OptionParser is unusable.
- disable_interspersed_args(self)
- enable_interspersed_args(self)
- error(self, msg)
- error(msg : string)
Print a usage message incorporating 'msg' to stderr and exit.
If you override this in a subclass, it should not return -- it
should either exit or raise an exception.
- exit(self, status=0, msg=None)
- expand_prog_name(self, s)
- format_epilog(self, formatter)
- format_option_help(self, formatter=None)
- get_default_values(self)
- get_description(self)
- get_option_group(self, opt_str)
- get_prog_name(self)
- get_usage(self)
- get_version(self)
- parse_args(self, args=None, values=None)
- parse_args(args : [string] = sys.argv[1:],
values : Values = None)
-> (values : Values, args : [string])
Parse the command-line options found in 'args' (default:
sys.argv[1:]). Any errors result in a call to 'error()', which
by default prints the usage message to stderr and calls
sys.exit() with an error message. On success returns a pair
(values, args) where 'values' is an Values instance (with all
your option values) and 'args' is the list of arguments left
over after parsing options.
- print_help(self, file=None)
- print_help(file : file = stdout)
Print an extended help message, listing all options and any
help text provided with them, to 'file' (default stdout).
- print_usage(self, file=None)
- print_usage(file : file = stdout)
Print the usage message for the current program (self.usage) to
'file' (default stdout). Any occurence of the string "%prog" in
self.usage is replaced with the name of the current program
(basename of sys.argv[0]). Does nothing if self.usage is empty
or not defined.
- print_version(self, file=None)
- print_version(file : file = stdout)
Print the version message for this program (self.version) to
'file' (default stdout). As with print_usage(), any occurence
of "%prog" in self.version is replaced by the current program's
name. Does nothing if self.version is empty or undefined.
- set_default(self, dest, value)
- set_defaults(self, **kwargs)
- set_process_default_values(self, process)
- set_usage(self, usage)
Data and other attributes inherited from optik.option_parser.OptionParser:
- standard_option_list = []
Methods inherited from optik.option_parser.OptionContainer:
- add_option(self, *args, **kwargs)
- add_option(Option)
add_option(opt_str, ..., kwarg=val, ...)
- add_options(self, option_list)
- format_description(self, formatter)
- get_option(self, opt_str)
- has_option(self, opt_str)
- remove_option(self, opt_str)
- set_conflict_handler(self, handler)
- set_description(self, description)
|
make_option = class Option(optik.option.Option) |
| | |
Data and other attributes defined here:
- TYPES = ('string', 'int', 'long', 'float', 'complex', 'choice', 'bool')
- TYPE_CHECKER = {'bool': <function check_bool at 0xcf4c80>, 'choice': <function check_choice at 0xcfda28>, 'complex': <function check_builtin at 0xcfdaa0>, 'float': <function check_builtin at 0xcfdaa0>, 'int': <function check_builtin at 0xcfdaa0>, 'long': <function check_builtin at 0xcfdaa0>}
Methods inherited from optik.option.Option:
- __init__(self, *opts, **attrs)
- __repr__ = _repr(self)
- __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)
Data and other attributes inherited from optik.option.Option:
- ACTIONS = ('store', 'store_const', 'store_true', 'store_false', 'append', 'append_const', 'count', 'callback', 'help', 'version')
- ALWAYS_TYPED_ACTIONS = ('store', 'append')
- ATTRS = ['action', 'type', 'dest', 'default', 'nargs', 'const', 'choices', 'callback', 'callback_args', 'callback_kwargs', 'help', 'metavar']
- CHECK_METHODS = [<function _check_action at 0xcfded8>, <function _check_type at 0xd00398>, <function _check_choice at 0xd00320>, <function _check_dest at 0xd002a8>, <function _check_const at 0xd00230>, <function _check_nargs at 0xd00de8>, <function _check_callback at 0xd3f938>]
- CONST_ACTIONS = ('store_const', 'append_const')
- STORE_ACTIONS = ('store', 'store_const', 'store_true', 'store_false', 'append', 'append_const', 'count')
- TYPED_ACTIONS = ('store', 'append', 'callback')
|
class option_parser(optik.option_parser.OptionParser) |
| | |
- Method resolution order:
- option_parser
- optik.option_parser.OptionParser
- optik.option_parser.OptionContainer
Methods defined here:
- __init__(self, usage=None, description=None, more_help=None)
- call_with_self_as_first_argument(self, callable, **kw)
- enable_chunk(self, easy_all=False)
- enable_show_defaults(self)
- format_help(self, formatter=None)
- option(self, *args, **kw)
- process(self, args=None, nargs=None, min_nargs=None, max_nargs=None)
- show_help(self, f=None)
Data and other attributes defined here:
- processed_options_type = <class 'libtbx.option_parser.processed_options'>
Methods inherited from optik.option_parser.OptionParser:
- add_option_group(self, *args, **kwargs)
- check_values(self, values, args)
- check_values(values : Values, args : [string])
-> (values : Values, args : [string])
Check that the supplied option values and leftover arguments are
valid. Returns the option values and leftover arguments
(possibly adjusted, possibly completely new -- whatever you
like). Default implementation just returns the passed-in
values; subclasses may override as desired.
- destroy(self)
- Declare that you are done with this OptionParser. This cleans up
reference cycles so the OptionParser (and all objects referenced by
it) can be garbage-collected promptly. After calling destroy(), the
OptionParser is unusable.
- disable_interspersed_args(self)
- enable_interspersed_args(self)
- error(self, msg)
- error(msg : string)
Print a usage message incorporating 'msg' to stderr and exit.
If you override this in a subclass, it should not return -- it
should either exit or raise an exception.
- exit(self, status=0, msg=None)
- expand_prog_name(self, s)
- format_epilog(self, formatter)
- format_option_help(self, formatter=None)
- get_default_values(self)
- get_description(self)
- get_option_group(self, opt_str)
- get_prog_name(self)
- get_usage(self)
- get_version(self)
- parse_args(self, args=None, values=None)
- parse_args(args : [string] = sys.argv[1:],
values : Values = None)
-> (values : Values, args : [string])
Parse the command-line options found in 'args' (default:
sys.argv[1:]). Any errors result in a call to 'error()', which
by default prints the usage message to stderr and calls
sys.exit() with an error message. On success returns a pair
(values, args) where 'values' is an Values instance (with all
your option values) and 'args' is the list of arguments left
over after parsing options.
- print_help(self, file=None)
- print_help(file : file = stdout)
Print an extended help message, listing all options and any
help text provided with them, to 'file' (default stdout).
- print_usage(self, file=None)
- print_usage(file : file = stdout)
Print the usage message for the current program (self.usage) to
'file' (default stdout). Any occurence of the string "%prog" in
self.usage is replaced with the name of the current program
(basename of sys.argv[0]). Does nothing if self.usage is empty
or not defined.
- print_version(self, file=None)
- print_version(file : file = stdout)
Print the version message for this program (self.version) to
'file' (default stdout). As with print_usage(), any occurence
of "%prog" in self.version is replaced by the current program's
name. Does nothing if self.version is empty or undefined.
- set_default(self, dest, value)
- set_defaults(self, **kwargs)
- set_process_default_values(self, process)
- set_usage(self, usage)
Data and other attributes inherited from optik.option_parser.OptionParser:
- standard_option_list = []
Methods inherited from optik.option_parser.OptionContainer:
- add_option(self, *args, **kwargs)
- add_option(Option)
add_option(opt_str, ..., kwarg=val, ...)
- add_options(self, option_list)
- format_description(self, formatter)
- get_option(self, opt_str)
- has_option(self, opt_str)
- remove_option(self, opt_str)
- set_conflict_handler(self, handler)
- set_description(self, description)
|
class processed_options(__builtin__.object) |
| | |
Methods defined here:
- __init__(self, parser, options, args, show_defaults_callback, chunk_callback)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
|