"""$URL: svn+ssh://svn.mems-exchange.org/repos/trunk/grouch/lib/script_util.py $
$Id: script_util.py 24750 2004-07-21 15:26:51Z dbinger $
"""

import sys

def announce (msg, threshold=1):
    import __main__
    if __main__.VERBOSITY >= threshold:
        sys.stdout.write(msg)
        sys.stdout.flush()

def error (msg):
    sys.stderr.write("error: " + msg + "\n")

def warn (msg):
    sys.stderr.write("warning: " + msg + "\n")
