mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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):
|
def fileno(self):
|
||||||
return self.buffer.fileno()
|
return self.buffer.fileno()
|
||||||
|
|
||||||
|
def isatty(self):
|
||||||
|
return self.buffer.isatty()
|
||||||
|
|
||||||
def write(self, s: str):
|
def write(self, s: str):
|
||||||
# XXX What if we were just reading?
|
# XXX What if we were just reading?
|
||||||
b = s.encode(self._encoding)
|
b = s.encode(self._encoding)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue