(fn)
Suppresses the output of fn on sys.stdout.
Suppresses the output of fn on sys.stdout.
Suppresses the output of fn on sys . stdout .
def suppress_output(fn):
    """Suppresses the output of fn on sys.stdout."""
    save_stdout = sys.stdout
    try:
        sys.stdout = DummyFile()
        fn()
    finally:
        sys.stdout = save_stdout
def suppress_output ( fn ) : save_stdout = sys . stdout try : sys . stdout = DummyFile ( ) fn ( ) finally : sys . stdout = save_stdout