Last updated:
0 purchases
pytee2 0.0.1
pytee2
pytee2 is a package providing functionalities of redirecting stdout and stderr to a string and an output file. The key feature of pytee2 is that it can redirect stdout and stderr from C binding invocations.
Table of Contents
pytee2
Installation
Usage
Known issues
License
Installation
pip install pytee2
Usage
from pytee2 import Tee
tee = Tee(output_filepath='output.txt')
tee.start()
# do many things...
tee.stop()
Now the stdout and stderr have been saved to output.txt, and you can get the string version of the output by
capturedtext = tee.get_capturedtext()
Known issues
pytee2 cannot work properly on Windows. This issue should be fixed in the future.
License
pytee2 is distributed under the terms of the MIT license.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.