Check input device is a terminal: Difference between revisions

m
replaced tty by terminal.
m (replaced tty by terminal.)
Line 260:
<lang Nim>import terminal
 
echo if stdin.isatty: "stdin is a ttyterminal" else: "stdin is not a ttyterminal"</lang>
 
{{out}}
<pre>Command: ./check_input_dev
Result: stdin is a ttyterminal</pre>
 
<pre>Command: ./check_input_dev <somefile
Result: stdin is not a ttyterminal</pre>
 
=={{header|OCaml}}==
Anonymous user