Re: How to handle two-level option processing with optparse

2006-01-26 Thread Steven Bethard
R. Bernstein wrote: > Magnus Lycka informs: >> [in response to my comment]: >>> I see how I missed this. Neither disable_.. or enable_.. have document >>> strings. And neither seem to described in the optparser section (6.21) >>> of the Python Library (http://docs.python.org/lib/module-optparse.htm

Re: How to handle two-level option processing with optparse

2006-01-26 Thread R. Bernstein
Magnus Lycka informs: > [in response to my comment]: > > I see how I missed this. Neither disable_.. or enable_.. have document > > strings. And neither seem to described in the optparser section (6.21) > > of the Python Library (http://docs.python.org/lib/module-optparse.html). > > http://docs.py

Re: How to handle two-level option processing with optparse

2006-01-26 Thread R. Bernstein
Steve Holden <[EMAIL PROTECTED]> writes: > Well you are just as capable ... Yes, I guess you are right. Done. Couldn't find how to suggest an addition to the Python Cookbook (other than some generic O'Reilly email), so I've put a submission to: http://aspn.activestate.com/ASPN/Cookbook/Python/ -

Re: How to handle two-level option processing with optparse

2006-01-26 Thread Magnus Lycka
R. Bernstein wrote: > I see how I missed this. Neither disable_.. or enable_.. have document > strings. And neither seem to described in the optparser section (6.21) > of the Python Library (http://docs.python.org/lib/module-optparse.html). http://docs.python.org/lib/optparse-other-methods.html --

Re: How to handle two-level option processing with optparse

2006-01-26 Thread Steve Holden
R. Bernstein wrote: > Giovanni Bajo suggests: > > >>If you call OptionParser.disable_interspersed_args() on your parser, >>it will stop parsing at the first positional argument, leaving other >>options unparsed. > > > Wow - that was a quick answer! Thanks - it works great! > > I see how I miss

Re: How to handle two-level option processing with optparse

2006-01-26 Thread R. Bernstein
Giovanni Bajo suggests: > If you call OptionParser.disable_interspersed_args() on your parser, > it will stop parsing at the first positional argument, leaving other > options unparsed. Wow - that was a quick answer! Thanks - it works great! I see how I missed this. Neither disable_.. or enable_

Re: How to handle two-level option processing with optparse

2006-01-25 Thread Giovanni Bajo
R. Bernstein wrote: > It seems that with all of the flexibility of optparse it should handle > this. I'm not sure right now what the best way to do so would be > though. Suggestions? If you call OptionParser.disable_interspersed_args() on your parser, it will stop parsing at the first positional