Skip to content Skip to sidebar Skip to footer

Python - Sys.stderr Not Getting Saved To .txt Or .log

I was checking the working of standard streams, and currently I am working with stderr using python. To explain clearly, the following is my code: print('Python') testt() when I r

Solution 1:

It seems that sys.stderr was never closed. When testt() errors, the program exits -- just the error message is redirected. So the file was blank.


Post a Comment for "Python - Sys.stderr Not Getting Saved To .txt Or .log"