I'm writing a script that acts as a proxy for a plugin class's run method.
The script would be invoked like this:
> main.py -v --plugin=Foo --extra=bar -c
The result of this command would be the equivalent of:
plugin = my.module.Foo()
plugin.run(extra='bar', c=True)
Note that anything in front of --plugin is used internally by main.py and not passed to the plugin. Anything after --plugin is ignored by main.py and instead passed directly to the plugin.
The problem I'm running into is that I can't find a getopt-like class that will allow me to parse argv without having to specify a list of allowed options.
I'd prefer not to have to rewrite getopt with one line commented out. Are there any better options out there?