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 |  |  |  | Fields: 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)
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.
validate_options(self, options)

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

break_parent_relationship, build_parent_relationship, flatten_command_tree, run_command

### Fields

global_options = [[--help]]

## Fields

CONSOLE_WIDTH = 80