This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zbysz
Recipients Arfrever, amaury.forgeotdarc, denilsonsa, eric.araujo, giampaolo.rodola, loewis, neologix, pitrou, python-dev, rosslagerwall, techtonik, vstinner, zbysz
Date 2012-02-12.23:28:21
SpamBayes Score 2.1560531e-13
Marked as misclassified No
Message-id <>
> Using strace, I see that stty calls ioctl(TIOCGWINSZ) on stdin (fd=0)
> if it failed on stdout (fd=1), whereas Python only tries stdout.
It was done this way by design. Maybe checking stdin can be also useful,
but it is a rather big change in semantics. I think it should be a separate bug.

It is pretty common for programs to behave differently when run through pipe, even if stdin is on a tty. stty is rather the exception than the rule. E.g. almost all programs disable color when piped explicitly through less. 'dpkg | cat' ignores terminal width. So does git and ls.
stty is special, because the only purpose of that program is to query terminal size, but it cannot be taken as a model for the behaviour of a general purpose program.
Date User Action Args
2012-02-12 23:28:22zbyszsetrecipients: + zbysz, loewis, amaury.forgeotdarc, pitrou, vstinner, techtonik, giampaolo.rodola, eric.araujo, Arfrever, denilsonsa, neologix, rosslagerwall, python-dev
2012-02-12 23:28:22zbyszsetmessageid: <>
2012-02-12 23:28:22zbyszlinkissue13609 messages
2012-02-12 23:28:21zbyszcreate