code: def cmdline(argv, flags):
      
      rules = dict([(flag, {'flags': ["--%s" % flag]}) for flag in flags])
      return parse(argv, rules)
docs: A cmdopts wrapper that takes a list of flags and builds the
         corresponding cmdopts rules to match those flags.