Classes | Functions | Variables
roscompile.terminal Namespace Reference

Classes

class  ColorFallback
 

Functions

def color_diff (diff)
 
def color_header (s, fore='WHITE', back='BLUE')
 
def color_text (s, fore='YELLOW')
 
def query_yes_no (question, default='no')
 

Variables

 Back
 
 COLUMNS = None
 
 Fore
 
 my_input = input
 

Function Documentation

◆ color_diff()

def roscompile.terminal.color_diff (   diff)

Definition at line 12 of file terminal.py.

◆ color_header()

def roscompile.terminal.color_header (   s,
  fore = 'WHITE',
  back = 'BLUE' 
)

Definition at line 27 of file terminal.py.

◆ color_text()

def roscompile.terminal.color_text (   s,
  fore = 'YELLOW' 
)

Definition at line 40 of file terminal.py.

◆ query_yes_no()

def roscompile.terminal.query_yes_no (   question,
  default = 'no' 
)
Ask a yes/no question via my_input() and return their answer.

Based on http://code.activestate.com/recipes/577058/

'question' is a string that is presented to the user.
'default' is the presumed answer if the user just hits <Enter>.
    It must be 'yes' (the default), 'no' or None (meaning
    an answer is required of the user).

The 'answer' return value is True for 'yes' or False for 'no'.

Definition at line 51 of file terminal.py.

Variable Documentation

◆ Back

roscompile.terminal.Back

Definition at line 9 of file terminal.py.

◆ COLUMNS

roscompile.terminal.COLUMNS = None

Definition at line 24 of file terminal.py.

◆ Fore

roscompile.terminal.Fore

Definition at line 9 of file terminal.py.

◆ my_input

roscompile.terminal.my_input = input

Definition at line 48 of file terminal.py.



roscompile
Author(s):
autogenerated on Tue Jun 21 2022 03:01:39