fErr = open('./fterr.txt','w+') print("foo\nbar\n", file=fErr)