Task

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



Related task

   Check input device is a terminal


  [ $ |from sys import stdout
to_stack( 1 if stdout.isatty() else 0)|
    python ]                            is ttyout ( --> b )     
 
  ttyout if 
    [ say "Looks like a teletype." ] 
  else 
    [ say "Not a teletype." ]