Add isatty() to TextIOWrapper.

This commit is contained in:
Guido van Rossum 2007-05-27 09:14:51 +00:00
parent eba769657a
commit 859b5ec240

View File

@ -1004,6 +1004,9 @@ class TextIOWrapper(TextIOBase):
def fileno(self):
return self.buffer.fileno()
def isatty(self):
return self.buffer.isatty()
def write(self, s: str):
# XXX What if we were just reading?
b = s.encode(self._encoding)