[ python-Bugs-900071 ] optparse: usage issues
SourceForge.net
noreply at sourceforge.net
Sun Mar 21 14:45:08 EST 2004
Bugs item #900071, was opened at 2004-02-19 02:14
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=900071&group_id=5470
Category: None
>Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Simon Dahlbacka (sdahlbac)
Assigned to: Greg Ward (gward)
Summary: optparse: usage issues
Initial Comment:
current documentation states that
usage = "usage: %prog [options] arg1 arg2"
parser = OptionParser(usage=usage)
would yield
usage: <yourscript> [options] arg1 arg2
however, using python 2.3.2
usage = "Usage: %prog [options] file"
yields:
usage: Usage <yourscript> [options] file"
IMO, it should be possible to replace the whole thing
(think i18n)
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2004-03-21 14:45
Message:
Logged In: YES
user_id=11375
The documentation is correct, but there's a bug in some code
that removes the 'usage:' prefix to avoid duplication. It was doing a
case-sensitive match, so your example with 'Usage:' didn't
remove the doubled word. Fixed in CVS head.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=900071&group_id=5470
More information about the Python-bugs-list
mailing list