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/
- class CommandLineApp(Ft.Lib.CommandLine.Command.Command)
- Overrides: __init__ from class Command
Generate the command tree (a show all commands look)
- gen_usage(self, command=None)
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:
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.
- run_commands(self, script_name=None, script_args=None)
Parse the command line and attempt to run the command.
Typically overridden in the subclasses.
- validate_options(self, options)
- Overrides: validate_options from class Command
- arguments = None
- commands = None
- description = None
- example = None
- global_options = [[--help], [--version]]
- name = None
- options = None
- project_name = None
- project_url = None
- project_version = None
- summary = None