Issue #8533: regrtest replaces also sys.stdout on Windows

Replace sys.stdout to use backslashreplace. Use '\n' newline on all operating
systems.
1 file changed