MECO™ API Reference
Static Public Member Functions | List of all members
mMeco.core.displayLib.Display Class Reference

Display class. More...

Inheritance diagram for mMeco.core.displayLib.Display:
mMeco.core.loggerLib.Logger

Static Public Member Functions

def displayInfo (text, startNewLine=True, endNewLine=True, useColor=True)
 Display given text in info format. More...
 
def displaySuccess (text, startNewLine=True, endNewLine=True, useColor=True)
 Display given text in success format. More...
 
def displayWarning (text, startNewLine=True, endNewLine=True, useColor=True)
 Display given text in warning format. More...
 
def displayFailure (text, startNewLine=True, endNewLine=True, useColor=True, stdErr=False)
 Display given text in failure format. More...
 
def displayHeaderLine (text, startNewLine=True, endNewLine=True, useColor=True)
 Display header line. More...
 
def displayHeaderText (text, startNewLine=False, endNewLine=False, useColor=True)
 Display header text. More...
 
def display (text, startNewLine=True, endNewLine=True, useColor=True, color=None, out=sys.stdout)
 Display given text by using file like object. More...
 
def displayStdOut (text, startNewLine=True, endNewLine=True)
 Display given text by using stdout. More...
 
def displayStdErr (text, startNewLine=True, endNewLine=True)
 Display given text by using stderr. More...
 
def displayBlankLine (count=1, out=sys.stdout)
 Display blank lines by giving counts. More...
 
def getDisplayColor (color)
 Get display color string for given color based on current platform. More...
 

Detailed Description

Display class.

Member Function Documentation

◆ displayInfo()

def mMeco.core.displayLib.Display.displayInfo (   text,
  startNewLine = True,
  endNewLine = True,
  useColor = True 
)
static

Display given text in info format.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | True | in ] - Display blank line at the start.
endNewLine[ bool | True | in ] - Display blank line at the end.
useColor[ bool | False | in ] - Use color to display the text.
Exceptions
N/A
Returns
None - None.

◆ displaySuccess()

def mMeco.core.displayLib.Display.displaySuccess (   text,
  startNewLine = True,
  endNewLine = True,
  useColor = True 
)
static

Display given text in success format.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | True | in ] - Display blank line at the start.
endNewLine[ bool | True | in ] - Display blank line at the end.
useColor[ bool | False | in ] - Use color to display the text.
Exceptions
N/A
Returns
None - None.

◆ displayWarning()

def mMeco.core.displayLib.Display.displayWarning (   text,
  startNewLine = True,
  endNewLine = True,
  useColor = True 
)
static

Display given text in warning format.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | True | in ] - Display blank line at the start.
endNewLine[ bool | True | in ] - Display blank line at the end.
useColor[ bool | False | in ] - Use color to display the text.
Exceptions
N/A
Returns
None - None.

◆ displayFailure()

def mMeco.core.displayLib.Display.displayFailure (   text,
  startNewLine = True,
  endNewLine = True,
  useColor = True,
  stdErr = False 
)
static

Display given text in failure format.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | True | in ] - Display blank line at the start.
endNewLine[ bool | True | in ] - Display blank line at the end.
useColor[ bool | False | in ] - Use color to display the text.
stdErr[ bool | False | in ] - Whether to use sys.stderr instead of sys.stdout.
Exceptions
N/A
Returns
None - None.

◆ displayHeaderLine()

def mMeco.core.displayLib.Display.displayHeaderLine (   text,
  startNewLine = True,
  endNewLine = True,
  useColor = True 
)
static

Display header line.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | True | in ] - Display blank line at the start.
endNewLine[ bool | True | in ] - Display blank line at the end.
useColor[ bool | True | in ] - Use color to display the text.
Exceptions
N/A
Returns
None - None.

◆ displayHeaderText()

def mMeco.core.displayLib.Display.displayHeaderText (   text,
  startNewLine = False,
  endNewLine = False,
  useColor = True 
)
static

Display header text.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | False | in ] - Display blank line at the start.
endNewLine[ bool | False | in ] - Display blank line at the end.
useColor[ bool | True | in ] - Use color to display the text.
Exceptions
N/A
Returns
None - None.

◆ display()

def mMeco.core.displayLib.Display.display (   text,
  startNewLine = True,
  endNewLine = True,
  useColor = True,
  color = None,
  out = sys.stdout 
)
static

Display given text by using file like object.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | True | in ] - Display blank line at the start.
endNewLine[ bool | True | in ] - Display blank line at the end.
useColor[ bool | False | in ] - Use color to display the text. This argument does nothing if color is not provided.
color[ bool | False | in ] - Text to format the color (like ANSI).
out[ file | sys.stdout | in ] - sys.stdout or sys.stderr
Exceptions
N/A
Returns
None - None.

◆ displayStdOut()

def mMeco.core.displayLib.Display.displayStdOut (   text,
  startNewLine = True,
  endNewLine = True 
)
static

Display given text by using stdout.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | True | in ] - Display blank line at the start.
endNewLine[ bool | True | in ] - Display blank line at the end.
Exceptions
N/A
Returns
None - None.

◆ displayStdErr()

def mMeco.core.displayLib.Display.displayStdErr (   text,
  startNewLine = True,
  endNewLine = True 
)
static

Display given text by using stderr.

Parameters
text[ str, list, tuple | None | in ] - Text to be displayed.
startNewLine[ bool | True | in ] - Display blank line at the start.
endNewLine[ bool | True | in ] - Display blank line at the end.
Exceptions
N/A
Returns
None - None.

◆ displayBlankLine()

def mMeco.core.displayLib.Display.displayBlankLine (   count = 1,
  out = sys.stdout 
)
static

Display blank lines by giving counts.

Parameters
count[ int | 1 | in ] - How many blank lines will be displayed.
out[ file | sys.stdout | in ] - sys.stdout or sys.stderr
Exceptions
N/A
Returns
None - None.

◆ getDisplayColor()

def mMeco.core.displayLib.Display.getDisplayColor (   color)
static

Get display color string for given color based on current platform.

Parameters
color[ enum | None | in ] - Any value from mMeco.displayLib.DisplayColorName enum class.
Exceptions
N/A
Returns
str - Color.

The documentation for this class was generated from the following file: