osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

if STREAM.isatty():


On Thu, 29 Aug 2019 16:42:44 +0100, Rhodri James wrote:

> I don't understand what's to not to understand.
> 
>    if condition:
>      do_something_because_condition_is_true()
>    else:
>      do_something_because_condition_is_false()
> 
> is a perfectly normal construction.  If you mean something else, please
> be explicit.

I've read some more thing on the python 3 's print, seems for the isatty
() discussed here is completely can done with using it by something like:

print(p, end='\r', flush=True)

Regards