Package lyntin :: Module commandmanager
[show private | hide private]
[frames | no frames]

Module lyntin.commandmanager

Lyntin comes with a series of commands for manipulating aliases, actions, highlights, and various other things. Both the commands and the managers that hold the data are all defined in various Lyntin modules in the "modules/" subdirectory and are loaded up at Lyntin startup.

Lyntin has an extremely powerful argument parser that allows Lyntin module writers to worry about the functionality of their command without having to deal with parsing out the arguments, type-checking, raising exceptions with command syntax help, and data conversion.

Commands are stored internally in the "CommandManager". They are global to Lyntin--there are no commands that only exist in the session they were declared in. Commands, however, are executed in a specific session. When they are executed, they are given three arguments: the session object for the session they were executed in, an argument dictionary from the argument parser, and the exact input the user typed.

Look at the modules/lyntincmds.py and modules/tintincmds.py modules for command examples. Additionally, check out the Lyntin module repository on http://lyntin.sourceforge.net/ for more examples.

default_resolver_hook:
  Allows you to fill in values for arguments the user didn't specify 
  on the command line.  

  Arg mapping: {"session": Session, "commandname", string}

  session - the session this command was executed in.

  commandname - the name of the command that was executed

Classes
CommandManager The CommandManager holds a series of _CommandData objects and methods to manipulate and use them.

Generated by Epydoc 2.1 on Mon Aug 9 09:17:42 2004 http://epydoc.sf.net