From: Guido van Rossum Date: Sun, 27 May 2007 09:14:51 +0000 (+0000) Subject: Add isatty() to TextIOWrapper. X-Git-Tag: v3.0a1~860 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=859b5ec240d438c691c0ca843f618c28e643d0c2;p=thirdparty%2FPython%2Fcpython.git Add isatty() to TextIOWrapper. --- diff --git a/Lib/io.py b/Lib/io.py index 67049e63b441..3fcab6b6939e 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)