[Happydoc-checkins] CVS: HappyDoc3/happydoclib status.py,NONE,1.1
Brought to you by:
doughellmann,
krlosaqp
From: Doug H. <dou...@us...> - 2002-12-01 22:35:56
|
Update of /cvsroot/happydoc/HappyDoc3/happydoclib In directory sc8-pr-cvs1:/tmp/cvs-serv27493/happydoclib Added Files: status.py Log Message: Module-level status message handling, so every class does not need to know that it is participating in a CommandLineApp program. --- NEW FILE: status.py --- # # $Id: status.py,v 1.1 2002/12/01 22:35:53 doughellmann Exp $ # # Copyright 2002 Racemi, Inc. # """Module interface for providing status messages to the user. """ # # Import system modules # # # Import Local modules # # # Module # _status_message_func = None def statusMessage(msg, verboseLevel=1, error=None): """Print a status message to output. Arguments msg='' -- The status message string to be printed. verboseLevel=1 -- The verbose level to use. The message will only be printed if the current verbose level is >= this number. error=None -- If true, the message is considered an error and printed as such. """ global _status_message_func if _status_message_func: _status_message_func(msg, verboseLevel, error) return def registerStatusMessageFunc(function): """Register the function to be called by statusMessage(). """ global _status_message_func _status_message_func = function return |