Package conary :: Package lib :: Module command :: Class AbstractCommand
[hide private]
[frames] | no frames]

Class AbstractCommand

source code

object --+
         |
        AbstractCommand
Known Subclasses:
command.ConaryCommand, command.HelpCommand

Abstract command object to be subclassed used to represent commands in a command line interface. To be used with MainHandler below. Assumes use of a lib.cfg.ConfigFile type configuration object.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
usage(self, errNo=1) source code
 
setParser(self, parser) source code
 
setMainHandler(self, mainHandler) source code
 
addParameters(self, argDef) source code
 
addConfigOptions(self, cfgMap, argDef) source code
 
addDocs(self, argDef)
Parse a docs dict assigned at the class level and add those docs to the parameters being sent to parseOptions.
source code
 
prepare(self) source code
 
processConfigOptions(self, cfg, cfgMap, argSet)
Manage any config maps we've set up, converting assigning them to the config object.
source code
 
requireParameters(self, args, expected=None, allowExtra=False, appendExtra=False, maxExtra=None) source code
 
runCommand(self, *args, **kw) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  commands = []
  paramHelp = ''
  help = ''
  description = None
  defaultGroup = 'Common Options'
  commandGroup = 'Common Commands'
  docs = {}
  hidden = False
  hobbleShortOpts = None
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)