Determining if stdout for a Python process is redirected

前端 未结 3 1357
难免孤独
难免孤独 2021-02-01 06:27

I\'ve noticed that curl can tell whether or not I\'m redirecting its output (in which case it puts up a progress bar).

Is there a reasonable way to do this in a Python s

3条回答
提交回复
热议问题