partial option parsing

Jack Moffitt <[email protected]> Sun, 24 Nov 2002 17:56:29 -0700
Newsgroups gmane.comp.python.optik.user
Message-ID <[email protected]>
Hello,

I've been playing around with getopt and optik today, trying to make
them do what I want, but neither seems to support what I need.

I have a program that has many subcommands.  A lot of these subcommands
take a common set of options for consistency.

Instead of reimplementing the same features for the common options
within every command, I thought it would be nice to factor out the
common options to some function like: parse_common_options().   After
that, I would then parse whatever was leftover that were specific
command options.

Unfortunately, there doesn't seem to be a way to partially parse
options, and get a leftover set.

Am I missing something?  Is there a better way to do this?  I'd really
rather not write a partial parser myself.

jack.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf