[ python-Feature Requests-1089955 ] optparse .error() should print options list

SourceForge.net noreply at sourceforge.net
Wed Dec 22 19:53:44 CET 2004


Feature Requests item #1089955, was opened at 2004-12-22 18:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1089955&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Mike Orr (hierro)
Assigned to: Nobody/Anonymous (nobody)
Summary: optparse .error() should print options list

Initial Comment:
Why doesn't optparse.OptionParser.error() print the
list of correct options along with the error message
and usage?  This is what the user needs to know
whenever there's an error.  One can override this in a
subclass, but it's frustrating to have to do it every
time.  

To do this, change the first line in
OptionParser.error() from:

    self.print_usage(sys.stderr)

to:

    self.print_help(sys.stderr)
    print >>sys.stderr

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1089955&group_id=5470


More information about the Python-bugs-list mailing list