'Returns the value for that attribute by accumualting all
the values found through the inline option, the parsing of the
file and the leftover'

def get_values(self, options, leftover=[]):

    def __get_items(input, split_spaces=True):
        "Splits    a    string    of    comma    separated    items.    Escaped    commas    will    not\n                                                be    split.    I.e.    Splitting    'a,    b\\,c,    d'    will    yield    ['a',    'b,c',    'd'].\n                                                If    split_spaces    is    set    to    False    spaces    will    not    be    split.    I.e.\n                                                Splitting    'a    b,    c\\,d,    e'    will    yield    ['a    b',    'c,d',    'e']"
        input = input.replace('\\\\', '\x00')
        if (not split_spaces):
            split = re.split('(?<!\\\\),', input)
        else:
            split = re.split('(?<!\\\\),|\\s', input)
        return (item.strip().replace('\x00', '\\').replace('\\,', ',') for item in split if item.strip())
    if self.use_leftover:
        add_on = leftover
        leftover = []
    else:
        add_on = []
    result = set()
    for items in add_on:
        result.update(__get_items(items, split_spaces=False))
    try:
        items = getattr(options, self.inline_option)
        result.update(__get_items(items))
    except (AttributeError, TypeError):
        pass
    try:
        flist = getattr(options, self.filename_option)
        file_content = []
        for line in open(flist).readlines():
            file_content += __get_items(line)
        if (len(file_content) == 0):
            raise CliError(('Empty    file    %s' % flist))
        result.update(file_content)
    except (AttributeError, TypeError):
        pass
    except IOError:
        raise CliError(('Could    not    open    file    %s' % flist))
    return (list(result), leftover)
