import terminal
# Output verbosity levels that we support
-ERROR = 0
-WARNING = 1
-NOTICE = 2
-INFO = 3
-DEBUG = 4
+ERROR, WARNING, NOTICE, INFO, DETAIL, DEBUG = range(6)
in_progress = False
Args:
msg; Message to display.
"""
- _Output(0, msg, _color.RED)
+ _Output(ERROR, msg, _color.RED)
def Warning(msg):
"""Display a warning message
Args:
msg; Message to display.
"""
- _Output(1, msg, _color.YELLOW)
+ _Output(WARNING, msg, _color.YELLOW)
def Notice(msg):
"""Display an important infomation message
Args:
msg; Message to display.
"""
- _Output(2, msg)
+ _Output(NOTICE, msg)
def Info(msg):
"""Display an infomation message
Args:
msg; Message to display.
"""
- _Output(3, msg)
+ _Output(INFO, msg)
def Detail(msg):
"""Display a detailed message
Args:
msg; Message to display.
"""
- _Output(4, msg)
+ _Output(DETAIL, msg)
def Debug(msg):
"""Display a debug message
Args:
msg; Message to display.
"""
- _Output(5, msg)
+ _Output(DEBUG, msg)
def UserOutput(msg):
"""Display a message regardless of the current output level.