ID EN
OS

ttyname

Python 3.11

Return a string which specifies the terminal device associated with file descriptor fd. If fd is not associated with a terminal device, an exception is raised.

Syntax

PYTHON
os.ttyname(fd, /)

See Also

Availability