argparse missing optparse capabilities?

rurpy at rurpy at
Thu Jan 5 03:26:56 EST 2012

On Jan 5, 1:05 am, "ru... at" <ru... at> wrote:
>   class AppendWithPos (argparse.Action):
>     def __call__ (self, parser, namespace, values,
> option_string=None):
>         if getattr (namespace, self.dest, None) is None:
>             setattr (namespace, self.dest, [])
>         getattr (namespace, self.dest).extend ((values, len (parser.largs)))

I realized right after posting that the above line should
be I think,
  getattr (namespace, self.dest).extend ((values, len

but that still doesn't help with the "unrecognised arguments"

More information about the Python-list mailing list