How to handle two-level option processing with optparse

Giovanni Bajo noway at sorry.com
Thu Jan 26 02:48:17 EST 2006


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 argument, leaving other options unparsed.
-- 
Giovanni Bajo





More information about the Python-list mailing list