2006-10-18 13:10:07

Base class for a command-line application, which is a type of Command

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Generate the command tree (a show all commands look)

Generate usage info. This includes description, command line, options, and subcommands or arguments.

classmethod(function) -> method

Convert a function to be a class method.

A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:

class C: def f(cls, arg1, arg2, ...): ... f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.

Class methods are different than C++ or Java static methods. If you want those, see the staticmethod builtin.
...

Parse the command line.

Parse the command line and attempt to run the command. Typically overridden in the subclasses.

- None
- None
- None
- None
- [[--help], [--version]]
- None
- None
- None
- None
- None
- None
236