Errors should never pass silently ... unless explicitly silenced.

Skip Montanaro skip at
Fri Feb 7 16:26:36 CET 2003

    Michele> In Linux I am doing
    Michele>   sys.stderr=file('/dev/null','w')

    Michele> Is there a better way of doing that?

How about:

    class NUL:
        def write(self, *args):

    sys.stderr = NUL()


More information about the Python-list mailing list