Task

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



Related task

   Check output device is a terminal


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