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 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 <>
> 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:11vstinnersetrecipients: + vstinner, loewis, amaury.forgeotdarc, pitrou, techtonik, giampaolo.rodola, eric.araujo, Arfrever, zbysz, denilsonsa, neologix, rosslagerwall, python-dev
2012-02-12 23:45:11vstinnersetmessageid: <>
2012-02-12 23:45:10vstinnerlinkissue13609 messages
2012-02-12 23:45:10vstinnercreate