Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python detect tty

if sys.stdout.isatty():
    # You're running in a real terminal
else:
    # You're being piped, redirected, cron
 
PREVIOUS NEXT
Tagged: #python #detect #tty
ADD COMMENT
Topic
Name
6+8 =