simrun
❭ utils
❭ silence_stdout
silence_stdout¶
- simrun.utils.silence_stdout(fun)¶
Decorator function to silence a function’s output.
Redirects the standard output to
os.devnull
while the function is called, and restores the original standard output afterwards. To be used as a decorator.