csbuild.terminfo module

Provides info about the terminal the makefile’s being run in

class csbuild.terminfo.TermColor

Bases: object

Abstracts color in a cross-platform way. Values and types will differ based on platform.

BLACK = '22;30'
BLUE = '1;34'
CYAN = '1;36'
DBLUE = '22;34'
DCYAN = '22;36'
DGREEN = '22;32'
DGREY = '1;30'
DMAGENTA = '22;35'
DRED = '22;31'
DYELLOW = '22;33'
GREEN = '1;32'
LGREY = '22;37'
MAGENTA = '1;35'
RED = '1;31'
WHITE = '1;37'
YELLOW = '1;33'
class csbuild.terminfo.TermInfo

Bases: object

Provides access to cross-platform methods of getting terminal info and interacting with colored output.

static GetDefaultColor()

Get the default color for this terminal

Returns:The default color
Return type:TermColor value
static GetNumColumns()

Retrieve the current column count for this terminal

Returns:Number of columns
Return type:int
static ResetColor()

Reset the color of the terminal to its default value

static SetColor(color)

Set the color of the terminal

Parameters:color (TermColor value) – The desired color
static SupportsColor()

Check whether the active terminal supports colors.

Returns:Whether or not color is supported
Return type:bool
cursesValid = True

This Page