Message153238
> 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. |
|
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 | |
|