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

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

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator