Skip to main content

isatty

Return true if the process has a controlling terminal.

def isatty(
fh: file-like object
) - > boolean

Return true if the process has a controlling terminal.

Parameters

NameTypeDescription
fhfile-like objectThe file handle or stream object to check for terminal connectivity

Returns

TypeDescription
booleanTrue if the file handle is connected to a terminal device, False otherwise