import re


def getvalue(content, name):
    """Get value of simple assigment, e.g. var = 'val'."""
    r = re.search(r'''(?m)^\s*{}\s*=\s*(['"])(?P<val>.*?)\1'''.format(re.escape(name)), content)
    return r.group('val') if r else ''