import re


def parse_graphicspath(fname):
    """Parse "\grapchicspath" and return the result as a list object."""
    with open(fname) as f:
        s = f.read()
    l = re.findall('.*graphicspath.*', s)
    graphicspath = ['./']
    if l:
        for i in re.sub('(^.*?{)|(\s*}$)', '', l[-1]).split(','):
            path = re.sub('\s*{|}\s*', '', i)
            if path not in graphicspath:
                graphicspath.append(path)
    return graphicspath