def getopts(argument_list):
    """
    Parses command line arguments from argv.
    :param argument_list: The command line input from the terminal, separated as a list.
    :return: Dictionary of argument name to value.
    """

    opts = {}
    while argument_list:
        if argument_list[0][0] == '-':
            opts[argument_list[0].lstrip('-')] = argument_list[1]
        argument_list = argument_list[1:]
    return opts