if STREAM.isatty():
Rhodri James
rhodri at kynesim.co.uk
Tue Sep 3 08:46:31 EDT 2019
On 30/08/2019 12:05, Hongyi Zhao wrote:
> On Fri, 30 Aug 2019 18:42:51 +1000, Chris Angelico wrote:
>
>> There is no magic here. It is simply asking a question, and then making
>> a decision based on the answer.
>
> What's your mean by saying this? Sorry for my poor English.
"No 'magic'" (魔法 if Google is to be trusted :-) means here that there is
nothing complicated and strange going on in the background.
"STREAM.isatty()" just asks a question -- is this a tty? -- and the
answer will always be the same for the same STREAM. Either it is a tty
or it isn't, it will not change from one to the other. It's exactly
like "STRING.isnumeric()"; for the same string it will always give the
same answer.
--
Rhodri James *-* Kynesim Ltd
More information about the Python-list
mailing list