[Mailman-Developers] usage() going to stderr

Bob Puff@NLE bob@nleaudio.com
Mon Oct 21 22:45:20 2002


Yeah, it's a real pain when you do 'program -?', and the output scrolls way more than one screen's worth, and you can't more it.

Bob


David Champion wrote:
> 
> * 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.
> 
> _______________________________________________
> Mailman-Developers mailing list
> Mailman-Developers@python.org
> http://mail.python.org/mailman-21/listinfo/mailman-developers