1 message in org.python.python-bugs-list[ python-Bugs-900071 ] optparse: usag...
FromSent OnAttachments
SourceForge.netMar 21, 2004 2:44 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-900071 ] optparse: usage issuesActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 21, 2004 2:44:57 pm
List:org.python.python-bugs-list

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.

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