[Mailman-Developers] usage() going to stderr
David Champion
dgc@uchicago.edu
Mon Oct 21 21:59:04 2002
* On 2002.10.21, in <2732E68C-E530-11D6-87E7-0003934516A8@plaidworks.com>,
* "Chuq Von Rospach" <chuqui@plaidworks.com> wrote:
> >Most of the scripts in the bin/ directory send their usage() output to
> >sys.stderr. Unfortunately, this makes it difficult to pipe the usage
> >output to a program such as more(1) (without redirecting stderr to
> >stdout).
> >
> >Thoughts?
>
> that's standard programming. Feature, not bug.
My feeling on the topic, having seen many programs that swing each way,
is that usage() should go to stderr when it's caused by a usage error,
but stdout when it's requested via "-h", "-?", "--help", or whatever.
At least this keeps with the general rule of thumb that errors go to
stderr, and output requested by a user goes to stdout.
Not that I adhere to this reliably, myself. :/
--
-D. We establised a fine coffee. What everybody can say
Sun Project, APC/UCCO TASTY! It's fresh, so-mild, with some special coffee's
University of Chicago bitter and sourtaste. "LET'S HAVE SUCH A COFFEE! NOW!"
dgc@uchicago.edu Please love CAFE MIAMI. Many thanks.