# over-ride stderr to prove that this function works.class NullDevice():def write(self, s):passsys.stderr = NullDevice()
# we must import print error AFTER we've removed the null device because# it has been assigned and will not be re-evaluated.# assume error function is in print_error.pyfrom print_error import error
# no message should be printederror("You won't see this error!")