IMP  2.1.0
The Integrative Modeling Platform
IMP.kernel.CommandDispatcher Class Reference

Allow applications to easily implement commmands. More...

Inherits object.

Detailed Description

Typically, an IMP application will use an instance of this class to provide a consistent interface to multiple distinct commands from a single binary, rather than providing a potentially large number of binaries.

Each command is implemented with a Python module of the same name that can be imported from the module (for example, if module_name is 'IMP.foo', the 'bar' command is provided by the IMP.foo.bar Python module, which would usually be found as modules/foo/pyext/src/bar.py). Each such module should have a docstring (doc) and a main() method that takes no arguments (the module should also call its main() method if it is run directly, i.e. with something like 'if name=="__main__": main()'). The encompassing module ('IMP.foo' in the example) should define _all_commands as a Python list of all valid commands.

Parameters
short_helpA few words that describe the application.
long_helpLonger text, used in the 'help' command.
module_nameName of the module (e.g. 'IMP.foo') that implements the commands.
Note
This class is only available in Python.

Definition at line 7337 of file kernel/__init__.py.


The documentation for this class was generated from the following file: