Skip to content


This module contains constants, which may be set in environment variables.

COLOR_SYSTEM module-attribute

COLOR_SYSTEM = get_environ('TEXTUAL_COLOR_SYSTEM', 'auto')

Force color system override.

DEBUG module-attribute

DEBUG = _get_environ_bool('TEXTUAL_DEBUG')

Enable debug mode.

DEVTOOLS_HOST module-attribute

DEVTOOLS_HOST = get_environ(

The host where textual console is running.

DEVTOOLS_PORT module-attribute

DEVTOOLS_PORT = _get_environ_int(

Constant with the port that the devtools will connect to.

DRIVER module-attribute

DRIVER = get_environ('TEXTUAL_DRIVER', None)

Import for replacement driver.

FILTERS module-attribute

FILTERS = get_environ('TEXTUAL_FILTERS', '')

A list of filters to apply to renderables.

LOG_FILE module-attribute

LOG_FILE = get_environ('TEXTUAL_LOG', None)

A last resort log file that appends all logs, when devtools isn't working.

MAX_FPS module-attribute

MAX_FPS = _get_environ_int('TEXTUAL_FPS', 60)

Maximum frames per second for updates.

PRESS module-attribute

PRESS = get_environ('TEXTUAL_PRESS', '')

Keys to automatically press.

SCREENSHOT_DELAY module-attribute

SCREENSHOT_DELAY = _get_environ_int(

Seconds delay before taking screenshot.

SCREENSHOT_FILENAME module-attribute


The filename to use for the screenshot.

SCREENSHOT_LOCATION module-attribute


The location where screenshots should be written.

SHOW_RETURN module-attribute

SHOW_RETURN = _get_environ_bool('TEXTUAL_SHOW_RETURN')

Write the return value on exit.

TEXTUAL_ANIMATIONS module-attribute

TEXTUAL_ANIMATIONS = _get_textual_animations()

Determines whether animations run or not.