# # $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