I have some simple python code that searches files for a string e.g.
def findPath( i_file) :
lines = open( i_file ).readlines()
for line in lines :
if line.startswith( "Path=" ) :
return # what to do here in order to get line content after "Path=" ?
If the string is fixed you can simply use:
if line.startswith("Path="): return line[5:]
which gives you everything from position 5 on in the string (a string is also a sequence so these sequence operators work here, too).
Or you can split the line at the first
if "=" in line: param, value = line.split("=",1)
Then param is "Path" and value is the rest after the first =.