Check output device is a terminal: Difference between revisions

Added Python
m (added whitespace before the TOC (table of contents), added a ;Task: (bold) header.)
(Added Python)
Line 222:
$ perl6 -e 'note $*OUT.t' >/dev/null
False</pre>
 
=={{header|Python}}==
Pretty much the same as [[Check input device is a terminal#Python]].
<lang python>from sys import stdout
if stdout.isatty():
print 'The output device is a teletype. Or something like a teletype.'
else:
print 'The output device isn\'t like a teletype.'</lang>
 
=={{header|Racket}}==
519

edits