sys.stdout.isatty usages:
Example:
if sys.stdout.isatty():
# You're running in a real terminal
else:
# You're being piped or redirected
sys.stdout.isatty usages:
Example:
if sys.stdout.isatty():
# You're running in a real terminal
else:
# You're being piped or redirected