Skip to content

# cmd2.constants

## `` cmd2.constants

Constants used throughout `cmd2`.

### `` INFINITY `module-attribute`

    INFINITY = float('inf')

### `` QUOTES `module-attribute`

    QUOTES = ['"', "'"]

### `` REDIRECTION_PIPE `module-attribute`

    REDIRECTION_PIPE = '|'

### `` REDIRECTION_OUTPUT `module-attribute`

    REDIRECTION_OUTPUT = '>'

### `` REDIRECTION_APPEND `module-attribute`

    REDIRECTION_APPEND = '>>'

### `` REDIRECTION_CHARS `module-attribute`

    REDIRECTION_CHARS = [REDIRECTION_PIPE, REDIRECTION_OUTPUT]

### `` REDIRECTION_TOKENS `module-attribute`

    REDIRECTION_TOKENS = [REDIRECTION_PIPE, REDIRECTION_OUTPUT, REDIRECTION_APPEND]

### `` COMMENT_CHAR `module-attribute`

    COMMENT_CHAR = '#'

### `` MULTILINE_TERMINATOR `module-attribute`

    MULTILINE_TERMINATOR = ';'

### `` LINE_FEED `module-attribute`

    LINE_FEED = '\n'

### `` DEFAULT_SHORTCUTS `module-attribute`

    DEFAULT_SHORTCUTS = {'?': 'help', '!': 'shell', '@': 'run_script', '@@': '_relative_run_script'}

### `` COMMAND_NAME `module-attribute`

    COMMAND_NAME = '<COMMAND_NAME>'

### `` COMMAND_FUNC_PREFIX `module-attribute`

    COMMAND_FUNC_PREFIX = 'do_'

### `` HELP_FUNC_PREFIX `module-attribute`

    HELP_FUNC_PREFIX = 'help_'

### `` COMPLETER_FUNC_PREFIX `module-attribute`

    COMPLETER_FUNC_PREFIX = 'complete_'

### `` CMD_ATTR_HELP_CATEGORY `module-attribute`

    CMD_ATTR_HELP_CATEGORY = 'help_category'

### `` CLASS_ATTR_DEFAULT_HELP_CATEGORY `module-attribute`

    CLASS_ATTR_DEFAULT_HELP_CATEGORY = 'cmd2_default_help_category'

### `` CMD_ATTR_ARGPARSER `module-attribute`

    CMD_ATTR_ARGPARSER = 'argparser'

### `` CMD_ATTR_PRESERVE_QUOTES `module-attribute`

    CMD_ATTR_PRESERVE_QUOTES = 'preserve_quotes'

### `` SUBCMD_ATTR_COMMAND `module-attribute`

    SUBCMD_ATTR_COMMAND = 'parent_command'

### `` SUBCMD_ATTR_NAME `module-attribute`

    SUBCMD_ATTR_NAME = 'subcommand_name'

### `` SUBCMD_ATTR_ADD_PARSER_KWARGS `module-attribute`

    SUBCMD_ATTR_ADD_PARSER_KWARGS = 'subcommand_add_parser_kwargs'

### `` PARSER_ATTR_COMMANDSET_ID `module-attribute`

    PARSER_ATTR_COMMANDSET_ID = 'command_set_id'

### `` NS_ATTR_SUBCMD_HANDLER `module-attribute`

    NS_ATTR_SUBCMD_HANDLER = '__subcmd_handler__'