Send message to shell

def out(msg, error=False):
        " Send message to shell "
        pipe = stdout
        if error:
            pipe = stderr
            msg = color_msg(msg, "warning")

        pipe.write("%s\n" % msg)