def findvar(filename, varname='Path', sep='='):
    for line in open(filename):
        if line.startswith(varname + sep):
            head, sep_, tail = line.partition(sep)
assert head == varname
assert sep_ == sep
return tail
How to remove the left part of a string?