mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Add isatty() to TextIOWrapper.
This commit is contained in:
parent
eba769657a
commit
859b5ec240
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue