Message153236
| 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 | <1329089302.55.0.964763536692.issue13609@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
> 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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2012-02-12 23:28:22 | zbysz | set | recipients: + zbysz, loewis, amaury.forgeotdarc, pitrou, vstinner, techtonik, giampaolo.rodola, eric.araujo, Arfrever, denilsonsa, neologix, rosslagerwall, python-dev |
| 2012-02-12 23:28:22 | zbysz | set | messageid: <1329089302.55.0.964763536692.issue13609@psf.upfronthosting.co.za> |
| 2012-02-12 23:28:22 | zbysz | link | issue13609 messages |
| 2012-02-12 23:28:21 | zbysz | create | |