]> granicus.if.org Git - python/commitdiff
Add isatty() to TextIOWrapper.
authorGuido van Rossum <guido@python.org>
Sun, 27 May 2007 09:14:51 +0000 (09:14 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 27 May 2007 09:14:51 +0000 (09:14 +0000)
Lib/io.py

index 67049e63b441e8147d791d17a0941aa7b2ee4d8a..3fcab6b6939e13dfd5c97fb89583151642a40c53 100644 (file)
--- 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)