Definition at line 4 of file readProv.py.
def python.readProv.filereader.__init__ |
( |
|
self | ) |
|
def python.readProv.filereader.readfile |
( |
|
self, |
|
|
|
nomefile |
|
) |
| |
Definition at line 21 of file readProv.py.
References mps_alisetup.append, python.read_provenance.filereader.startswith(), and python.readProv.filereader.startswith().
22 "Reads the file line by line and searches for the begin and the end of each Module block" 23 aFile = open(nomefile)
29 insideModuleBlock =
False 30 insideParameterBlock =
False 33 for line
in aFile.readlines():
34 if line.startswith(
"Processing History:"):
37 elif (
not line.startswith(
'---------Event'))
and processHistory:
38 splitLine= line.split()
39 if splitLine[3]==
'[2]':
44 elif line.startswith(
'---------Event')
and processing:
45 file_modules[
'Processing']=value
49 if insideParameterBlock:
50 module.append(tuple(value))
51 file_modules[key].
append(module)
52 insideParameterBlock =
False 53 insideModuleBlock =
False 56 splitLine= line.split()
58 if key
not in file_modules.keys():
60 module.append(splitLine[-2])
61 value.append(line[:-1])
62 insideModuleBlock =
True 63 insideParameterBlock =
False 64 elif (line.startswith(
' parameters'))
and insideModuleBlock:
65 insideParameterBlock =
True 66 value.append(line[:-1])
67 elif line.startswith(
'ESModule')
and insideParameterBlock:
68 module.append(tuple(value))
69 file_modules[key].
append(module)
70 insideParameterBlock =
False 71 insideModuleBlock =
False 77 elif (insideParameterBlock):
78 value.append(line[:-1])
80 if insideParameterBlock:
81 module.append(tuple(value))
82 file_modules[key].
append(module)
83 insideParameterBlock =
False 84 insideModuleBlock =
False 89 def readfile(self, nomefile)
def startswith(self, line)
def python.readProv.filereader.startswith |
( |
|
self, |
|
|
|
line |
|
) |
| |
python.readProv.filereader.aList |