Task

Demonstrate how to check whether the output device is a terminal or not.



Related task

   Check input device is a terminal


set toTTY [dict exists [fconfigure stdout] -mode]
puts [expr {$toTTY ? "Output goes to tty" : "Output doesn't go to tty"}]