+ 1
you can use contextlib.redirect_stdout like this: with open(your_target_file) as f: with redirect_stdout(f): #rest of the redirected stdout code
14th Mar 2018, 10:35 AM
Amaras A
Amaras A - avatar