tools

HideStdoutPrinting

ContextManager for temporarily disabeling printing to stdout

tessif.write.tools is a tessif module for aggregating output writing tools.

class tessif.write.tools.HideStdoutPrinting[source]

Bases: object

ContextManager for temporarily disabeling printing to stdout

Originally written by Alexander Chzhen.

Examples

>>> import tessif.write.tools as write_tools
>>> with HideStdoutPrinting():
...     print("This will not be printed")
>>> print("This will be printed as before")
This will be printed as before