[issue5374] optparse special usage tokens conflict with formatting characters

2009-03-18 Thread Andy Buckley
Andy Buckley added the comment: I'm easy either way --- I appreciate that it is a non-issue with new formatting, but until developers can rely on the presence of Py >= 2.6, %-formatting wil continue to be widely used. Since optparse's special use of %-delimited tokens clashes with the establish

[issue5374] optparse special usage tokens conflict with formatting characters

2009-03-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think this patch should be applied for two reasons. First, this is just a general comment on % formatting that could apply everywhere % formatting is used (the correct place for it is in docs for % formatting). Second, it has become a non-issue with

[issue5374] optparse special usage tokens conflict with formatting characters

2009-03-17 Thread Andy Buckley
Andy Buckley added the comment: Sorry, browser error last time. Should work now (fingers crossed). -- keywords: +patch Added file: http://bugs.python.org/file13360/optparse-prog-escape.patch ___ Python tracker

[issue5374] optparse special usage tokens conflict with formatting characters

2009-03-17 Thread Andy Buckley
Andy Buckley added the comment: Doc patch for Doc/library/optparse.rst attached. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue5374] optparse special usage tokens conflict with formatting characters

2009-02-26 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: On Thu, Feb 26, 2009 at 9:32 AM, Andy Buckley wrote: > Dang, why didn't I think of that? Cheers. Might be worth mentioning that > in the documentation, in case there are other people with my particular > brand of tunnel vision ;) I am not entirely sure

[issue5374] optparse special usage tokens conflict with formatting characters

2009-02-26 Thread Andy Buckley
Andy Buckley added the comment: Dang, why didn't I think of that? Cheers. Might be worth mentioning that in the documentation, in case there are other people with my particular brand of tunnel vision ;) ___ Python tracker _

[issue5374] optparse special usage tokens conflict with formatting characters

2009-02-26 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: Please use the fix suggested by Tim Gordon. -- nosy: +draghuram resolution: -> works for me status: open -> closed ___ Python tracker ___

[issue5374] optparse special usage tokens conflict with formatting characters

2009-02-26 Thread Tim Gordon
Tim Gordon added the comment: Try escaping the '%prog' in your usage string (i.e. use '%%prog' instead) so you don't get the error when you substitute values in. -- nosy: +QuantumTim ___ Python tracker ___

[issue5374] optparse special usage tokens conflict with formatting characters

2009-02-26 Thread Andy Buckley
New submission from Andy Buckley : optparse's OptionParser takes a usage string as a constructor argument, in which a "%prog" token is replaced with the executable name. Nice idea, but the choice of a percent sign for token delimiter is troublesome since it means that attempting to substitute any