Task

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



Related task

   Check output device is a terminal


import terminal
 
echo if stdin.isatty: "stdin is a terminal" else: "stdin is not a terminal"