Code
Director
Main classes for director.
-
class director.Action
Base class for command line actions.
-
description(*args, **kwargs)
Internal wrapper that actually executes the method.
Parameters: |
- self: the class methods container object.
- *args: any non keyword arguments.
- **kwargs: all keyword arguments.
|
-
help(*args, **kwargs)
Internal wrapper that actually executes the method.
Parameters: |
- self: the class methods container object.
- *args: any non keyword arguments.
- **kwargs: all keyword arguments.
|
-
class director.ActionRunner(args, plugin_package)
In charge of running plugins based on information passed in via arguments.
-
parse_options()
Parse the options into something that can be passed to a method.
Returns a usable dictionary to pass to a method.
-
run(filter_obj=None)
Runs the generated code.
Parameters: |
- filter_obj: the filter object.
|
-
run_code()
Takes care of running the code created.
code is the code to execute.
Director Filter
Exception filters for director.
-
class director.filter.ExceptionFilter(exception, error_text='%s')
Parent class for all filters.
-
filter(exception)
Filters an exception. True on filter, False otherwise.
Parameters: |
- exception: the exception being filtered.
|
-
class director.filter.Filter
Holds all filters to execute on exception.
-
execute_filters(exception)
Executes all filters with an exception.
Parameters: |
- exception: the exception that is going to be filtered.
|
-
register_filter(exception_filter)
Registers an ExceptionFilter.
Parameters: |
- exception_filter: the ExceptionFilter to add.
|
director decorators
All decorators for director.
-
director.decorators.general_help(desc, options={}, examples=[])
Adds a help variable to a class method based on keyword arguments as well
as saving the original method as meth. This can be used in more verbose
help cases.
Parameters: |
- desc: the description.
- options: a dictionary mapping options and their descriptions.
- examples: a list of examples.
|
-
director.decorators.simple_help(help_txt)
Adds a help variable to a class method as well as saving the original
method as meth. This is best used for very simple help cases.
Parameters: |
- help_txt: the text to add as help text.
|
director codes
Code symbols package.
director codes system
Code symbols for system related items.
- SYSTEM_OK: Exit to shell if everything was OK.
- NOT_ENOUGH_PARAMETERS: Exit to shell if not enough parameters are passed.
- EXCEPTION_RAISED: Exit to the shell if an exception is raised.