MCPcopy Index your code
hub / github.com/python/cpython / isatty

Method isatty

Lib/_pyio.py:1845–1848  ·  view source on GitHub ↗

True if the file is connected to a TTY device.

(self)

Source from the content-addressed store, hash-verified

1843 return self._fd
1844
1845 def isatty(self):
1846 """True if the file is connected to a TTY device."""
1847 self._checkClosed()
1848 return os.isatty(self._fd)
1849
1850 def _isatty_open_only(self):
1851 """Checks whether the file is a TTY using an open-only optimization.

Callers 2

testErrorsMethod · 0.95
testAblesMethod · 0.95

Calls 2

_checkClosedMethod · 0.45
isattyMethod · 0.45

Tested by 2

testErrorsMethod · 0.76
testAblesMethod · 0.76