[Mailman-Developers] usage() going to stderr

Barry A. Warsaw barry@python.org
Mon Oct 21 22:14:20 2002


>>>>> "DC" == Donn Cave <donn@u.washington.edu> writes:

    DC> Incidentally, I note an inconsistency - "mailmanctl" is coded
    DC> to write usage to sys.stderr, but stderr is gimmicked by
    DC> LogStdErr and actually goes to unit 1, not unit 2.

qrunner is the same.  Ug, did someone open up a can of worms around
here?  I think I'm going to change LogStdErr() so that it will
optionally log to the real stderr as well as the log file.  That's
probably the best fix and can be done in a mostly transparent way, I
think.

>>>>> "DC" == David Champion <dgc@uchicago.edu> writes:

    DC> My feeling on the topic, having seen many programs that swing
    DC> each way, is that usage() should go to stderr when it's caused
    DC> by a usage error, but stdout when it's requested via "-h",
    DC> "-?", "--help", or whatever.  At least this keeps with the
    DC> general rule of thumb that errors go to stderr, and output
    DC> requested by a user goes to stdout.

I'd agree in general, but it would mean we'd have to patch every
usage() function in cron/* and bin/*.  Not something I want to spend
time on.

-Barry