4Suite™ API Documentation

# ► Module Ft.Lib.CommandLine.CommandLineApp

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/

Classes: CommandLineApp |  |  |  | Globals: CONSOLE_WIDTH

## Classes

class CommandLineApp(Ft.Lib.CommandLine.Command.Command)

  ### Methods

  __init__(self, name, description, verbose_description, subCommands, options=None, authenticationFunction=None, ourOptions=None, enableShowCommands=1, fileName=None)
    Overrides: __init__ from class Command
  gen_command_tree(self)
    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.
  get_help_doc_info(self)
  parse_command_line(self)
    Parse the command line
  run(self, script_name=None, script_args=None)
    Parse the command line and attempt to run the command. Typically overridden in the subclasses.
  validate_arguments(self, args)
    Validate the arguments. Typically overridden in the subclasses.
    Overrides: validate_arguments from class Command
  validate_options(self, options)
    Overrides: validate_options from class Command

  ### Methods inherited from class Ft.Lib.CommandLine.Command.Command

  break_parent_relationship, build_parent_relationship, flatten_command_tree, run_command

  ### Members

  global_options = [[--help]]

## Globals

CONSOLE_WIDTH = 80