3 ms·
Instead of os.isatty(sys.stdout.fileno()) (ew) you should just use sys.stdout.isatty(). In addition to being shorter, it will work everywhere [that Python does]
by devinj 17y ago
Instead of os.isatty(sys.stdout.fileno()) (ew) you should just use sys.stdout.isatty(). In addition to being shorter, it will work everywhere [that Python does], not just Unix.