#NEWLINE# def format_message( action , msg = '' , color = '' , on_color = '' , bright = True , indent = 12 ) : #NEWLINE# #INDENT# 'Format message.' #NEWLINE# action = action . rjust ( indent , ' ' ) #NEWLINE# color = getattr ( Fore , color . upper ( ) , '' ) #NEWLINE# on_color = getattr ( Back , on_color . upper ( ) , '' ) #NEWLINE# style = ( Style . BRIGHT if bright else ( Style . DIM if ( bright is False ) else '' ) ) #NEWLINE# return '' . join ( [ color , on_color , on_color , action , Fore . RESET , Back . RESET , Style . RESET_ALL , '  ' , msg ] )