def s3_debug(self, message, value=None):

        # Restore stderr
        stderr_redirector = sys.stderr
        sys.stderr = self._resultForDoCleanups.stderr0

        output = s3_unicode(message)
        if value:
            output = "%s: %s" % (output, s3_unicode(value))

        try:
            print >> sys.stderr, output
        except:
            # Unicode string
            print >> sys.stderr, "Debug crashed"

        # Redirect stderr back again
        sys.stderr = stderr_redirector

    # -------------------------------------------------------------------------
Provide an easy, safe, systematic way of handling Debug output
dataset/ETHPy150Open sahana/eden/modules/tests/web2unittest.py/Web2UnitTest.s3_debug