Message153238
| Author |
vstinner |
| Recipients |
Arfrever, amaury.forgeotdarc, denilsonsa, eric.araujo, giampaolo.rodola, loewis, neologix, pitrou, python-dev, rosslagerwall, techtonik, vstinner, zbysz |
| Date |
2012年02月12日.23:45:10 |
| SpamBayes Score |
1.7871923e-08 |
| Marked as misclassified |
No |
| Message-id |
<1329090311.11.0.743991113314.issue13609@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> E.g. almost all programs disable color when piped explicitly through less.
Using my patch, you can use os.get_terminal_size(sys.stdout.fileno()) if you like to get an error if sys.stdout is a pipe. My patch only changes the behaviour if no argument is specified (hum, the "special" behaviour should be documented). Or you can also check explicitly sys.stdout.isatty().
It is just more convinient to fallback to stdin if stdout is not a TTY. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年02月12日 23:45:11 | vstinner | set | recipients:
+ vstinner, loewis, amaury.forgeotdarc, pitrou, techtonik, giampaolo.rodola, eric.araujo, Arfrever, zbysz, denilsonsa, neologix, rosslagerwall, python-dev |
| 2012年02月12日 23:45:11 | vstinner | set | messageid: <1329090311.11.0.743991113314.issue13609@psf.upfronthosting.co.za> |
| 2012年02月12日 23:45:10 | vstinner | link | issue13609 messages |
| 2012年02月12日 23:45:10 | vstinner | create |
|