…tput based on sys.stdout.isatty() (Issue #5043).