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

Display class. More...

Inheritance diagram for mCore.displayLib.Display:

Static Public Member Functions

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...
 
DISPLAY
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 display (text, startNewLine=True, endNewLine=True, useColor=True, color=None, out=sys.stdout)
 Display given text by using file like object. More...
 
HEADER
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...
 

Detailed Description

Display class.

Member Function Documentation

◆ displayInfo()

def mCore.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 mCore.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 mCore.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 mCore.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.

◆ display()

def mCore.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.

◆ displayHeaderLine()

def mCore.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 mCore.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.

◆ displayStdOut()

def mCore.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 mCore.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 mCore.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 mCore.displayLib.Display.getDisplayColor (   color)
static

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

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

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