A command line interface to Bugs Everywhere.
Class for parsing the command line arguments for be. This class does not contain a useful _run() method. Call this module’s main() function instead.
>>> ui = libbe.command.UserInterface()
>>> ui.io.stdout = sys.stdout
>>> be = BE(ui=ui)
>>> ui.io.setup_command(be)
>>> p = CmdOptionParser(be)
>>> p.exit_after_callback = False
>>> try:
... options,args = p.parse_args(['--help'])
... except CallbackExit:
... pass
usage: be [options] [COMMAND [command-options] [COMMAND-ARGS ...]]
<BLANKLINE>
Options:
-h, --help Print a help message.
<BLANKLINE>
--complete Print a list of possible completions.
<BLANKLINE>
--version Print version string.
...
>>> try:
... options,args = p.parse_args(['--complete'])
... except CallbackExit:
... print ' got callback'
--help
--version
...
subscribe
tag
target
got callback
Methods
| cleanup | |
| complete | |
| full_version | |
| help | |
| run | |
| usage | |
| version |
Methods
| add_option | |
| add_option_group | |
| add_options | |
| callback | |
| check_values | |
| complete | |
| destroy | |
| disable_interspersed_args | |
| enable_interspersed_args | |
| error | |
| exit | |
| expand_prog_name | |
| format_description | |
| format_epilog | |
| format_help | |
| format_option_help | |
| get_default_values | |
| get_description | |
| get_option | |
| get_option_group | |
| get_prog_name | |
| get_usage | |
| get_version | |
| has_option | |
| parse_args | |
| print_help | |
| print_usage | |
| print_version | |
| process_raw_argument | |
| remove_option | |
| set_conflict_handler | |
| set_default | |
| set_defaults | |
| set_description | |
| set_process_default_values | |
| set_usage |
Methods
| cleanup | |
| help | |
| run | |
| setup_command |