San <elias.h...@web.de> added the comment:
I get your point. But I thought setting 'stdout=PIPE' should not send the stdout directly to the terminal but rather through the pipe first?! Also what you're saying seems to contradict that this doesn't happen if I don't set the encoding and let it be a byte-stream. In that case you get the full byte-stream without any control-characters being executed. In my opinion it is unintuitive that this is happening. For instance if I open a file using io, that contains the same control characters like so: f = open('cc.txt', 'r', encoding='latin_1') Then gladly this doesn't happen and the control chars get escaped using \x1b which is what I would also expect to happen when using Popen. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44709> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com