stouputils.ctx package#
This module provides context managers for various utilities such as logging to a file, measuring execution time, silencing output, and setting multiprocessing start methods.
LogToFile- Context manager to log to a file every print call (with LINE_UP handling)MeasureTime- Context manager to measure execution time of a code blockMuffle- Context manager that temporarily silences output (alternative to@silent)DoNothing- Context manager that does nothing (no-op)SetMPStartMethod- Context manager to temporarily set multiprocessing start method