tty.isatty(fd)
如果给定的 fd 与终端关联,则 tty.isatty() 方法返回 true,否则返回 false,包括每当 fd 不是非负整数时。
¥The tty.isatty() method returns true if the given fd is associated with
a TTY and false if it is not, including whenever fd is not a non-negative
integer.