代码示例:(标识:python_ref_file_isatty)
python_ref_file_isatty.py
f = open("demofile.txt", "r")

print(f.isatty())
运行结果: