I have no issue with this on Mac. Windows seems to have trouble opening it.
I have a file name eg : stdout_blahblah_2020-08-25T00:00:00.000Z_2020-08-26T00:00:00.000Z.txt
I cant change the file name unfortunately and I have tons of them to open. This is a simple code I wrote:
sysout_filename = "stdout_blahblah_2020-08-25T00:00:00.000Z_2020-08-26T00:00:00.000Z.txt"
sys.stdout = open(sysout_filename, "w")
So how can I open this file without getting OSError
.