Issue #12591: Improve support of "universal newlines" in the subprocess

module: the piped streams can now be properly read from or written to.
This commit is contained in:
Antoine Pitrou 2011-07-23 22:04:41 +02:00
commit e02891b459
3 changed files with 52 additions and 17 deletions

View file

@ -728,7 +728,7 @@ class Popen(object):
if p2cwrite != -1:
self.stdin = io.open(p2cwrite, 'wb', bufsize)
if self.universal_newlines:
self.stdin = io.TextIOWrapper(self.stdin)
self.stdin = io.TextIOWrapper(self.stdin, write_through=True)
if c2pread != -1:
self.stdout = io.open(c2pread, 'rb', bufsize)
if universal_newlines: