summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-27 09:14:51 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-27 09:14:51 (GMT)
commit859b5ec240d438c691c0ca843f618c28e643d0c2 (patch)
tree0a4ef8e2de83f6394a16c1343b55f29d2edcadff
parenteba769657a32cb08d96f021f40c79a54ade0bffc (diff)
downloadcpython-859b5ec240d438c691c0ca843f618c28e643d0c2.zip
cpython-859b5ec240d438c691c0ca843f618c28e643d0c2.tar.gz
cpython-859b5ec240d438c691c0ca843f618c28e643d0c2.tar.bz2
Add isatty() to TextIOWrapper.
-rw-r--r--Lib/io.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/io.py b/Lib/io.py
index 67049e6..3fcab6b 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -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)