The CommandManager holds a series of _CommandData objects and methods
to manipulate and use them. Lyntin developers can add their own commands
to Lyntin.
There should be one instance of the CommandManager and the engine
should have it. All CommandManager interaction should be done through the
exported module.
| Method Summary |
| |
__init__(self)
|
| |
addCommand(self,
name,
func,
arguments,
argoptions,
helptext)
Registers a command. |
| |
addSession(self,
newsession,
basesession)
Tells the manager to create a new session based on another
session. (inherited from Manager)
|
| |
clear(self,
ses)
Removes everything the manager was managing--essentially reinitializes
it. (inherited from Manager)
|
| None or string
|
filter(self,
args)
Takes in user command lines and handles commands that start with a
Lyntin command character. |
| ArgParser instance
|
getArgParser(self,
name)
Returns the arguments parser for a given command name. |
| function
|
getCommand(self,
name)
Returns the function for a given command name. |
| list of strings
|
getCommands(self)
Returns a list of the commands we have registered. |
| string
|
getInfo(self,
ses,
text)
Returns information managed by this class. (inherited from Manager)
|
| list of strings
|
getState(self,
ses)
Returns the state of something as a list of command strings without
the command char (which is added by #write). (inherited from Manager)
|
| string
|
getStatus(self,
ses)
Returns a one-liner status of the state of this manager for a given
session. (inherited from Manager)
|
| boolean
|
removeCommand(self,
name)
Removes a command (and the help text) for whatever reasons. |
| |
removeSession(self,
ses)
Tells the manager to remove information regarding the session. (inherited from Manager)
|