python detect tty
if sys.stdout.isatty():
# You're running in a real terminal
else:
# You're being piped, redirected, cron
Are there any code examples left?
New code examples in category Python
if sys.stdout.isatty():
# You're running in a real terminal
else:
# You're being piped, redirected, cron