Definition
The isatty() method returns True if the file stream is interactive, example: connected to a terminal device.
Syntax
file.isatty()
Parameters
No Parameters.
Examples:
f = open("myFile.txt", "r")
print(f.isatty())
The isatty() method returns True if the file stream is interactive, example: connected to a terminal device.
file.isatty()
No Parameters.
f = open("myFile.txt", "r")
print(f.isatty())