Hacker News new | ask | show | jobs
by take-five 780 days ago
Something like (in Python)

os.isatty(sys.stdout.fileno())

1 comments

That doesn't say where it's piped though. It could be redirected to a file, or piped to something harmless like jq.