def parse_argv(argv):
    """A very simple argv parser. Returns a list of (opts, args) for options
    and arguments in the passed argv. It won't try to validate anything.
    """
    opts = []
    args = []
    for arg in argv:
        if arg.startswith('-'):
            parts = arg.split('=', 1)
            if len(parts) == 1:
                val = (parts[0], None)
            else:
                val = (parts[0], parts[1])

            opts.append(val)
        else:
            args.append(arg)

    return opts, args