def options2args(options):
    """Convert a list of command line options to a args and kwargs """
    args = list()
    kwargs = dict()
    for a in options:
        if "=" in a:
            a = a.split("=", maxsplit=1)
            kwargs[a[0].lstrip("-")] = a[1]
        else:
            args.append(a)
    return args, kwargs