I have a file which has some lines of:
FS "name" machine:"path"
{
}
which I want to read whatever comes after FS and return each parameter. I mean return should be name, machine and path.
Name:
"/PF/B/"
"/PF/A/"
Machine:
FFFFFF..
XXXXXX…
Path:
“/PF/J”
“/PF/K”
The code:
Def parse()
with open (myfile.txt) as f:
for line in f:
if line.strip().startswith(‘FS’)
Name = []
Machine = []
Path = []
????
Any help would be appreciated.