18 |
|
writeflag = False |
19 |
|
cycleflag = False |
20 |
|
typeCycle = re.compile('^(Cycle \w*)') |
21 |
+ |
if len(contents)==0 : |
22 |
+ |
self.page.write(' * No data about summary\n') |
23 |
|
for line in contents : |
24 |
|
matchCycle = typeCycle.search(line) |
25 |
|
if line=='# Summary\n' : |
26 |
+ |
self.page.write(' * Summary\n') |
27 |
|
writeflag = True |
28 |
|
elif line=='# Levels\n' : |
29 |
|
writeflag = False |
42 |
|
minimise for any given software system--a high value indicates a |
43 |
|
strongly coupled system and less coupling is better. |
44 |
|
</pre> |
42 |
– |
<<<<<<< makeDepMetrics.py |
45 |
|
''') |
46 |
|
break |
47 |
|
elif line=='\n' : |
48 |
|
continue |
49 |
|
elif line[0:5] =='* CCD' : |
50 |
|
writeflag = False |
49 |
– |
======= |
50 |
– |
''') |
51 |
– |
>>>>>>> 1.6 |
51 |
|
elif line=='# Cycles\n' : |
52 |
|
self.page.write(' * Cycles\n\n') |
53 |
|
self.page.write('<div id="test">\n') |
59 |
|
elif writeflag : |
60 |
|
self.page.write(' * '+line) |
61 |
|
else : |
63 |
– |
print line |
62 |
|
continue |
63 |
|
|
64 |
|
|
69 |
|
writeflag = False |
70 |
|
valueflag = False |
71 |
|
if len(contents)==0 : |
72 |
< |
self.page.write('---+++++No data about metrics information.\n') |
72 |
> |
self.page.write(' * No data about metrics information.\n') |
73 |
|
return pack |
74 |
|
for line in contents : |
75 |
|
if line =='# Levels\n' : |
92 |
|
continue |
93 |
|
else : |
94 |
|
temp =line.strip() |
97 |
– |
print temp |
95 |
|
pack[j].append(temp) |
96 |
|
return pack |
97 |
|
# repack return list [[levels], [level1, [PACKEGE1,module1,module2,...], [PACKEGE2,module1,module2], ..],[level2,[],[],...] ...] |
98 |
|
def repack(self,pack): |
102 |
– |
#print pack |
99 |
|
listlen = len(pack) |
100 |
|
pack2 = [['Levels']] |
101 |
|
countpack = 0 |
113 |
|
temp.append(title) |
114 |
|
packname.append(temp) |
115 |
|
packname[check].append(module) |
120 |
– |
#print packname[0] |
116 |
|
else: |
117 |
|
if packname[check][0]==title: |
123 |
– |
#print 'it\'s work!' |
118 |
|
packname[check].append(module) |
119 |
|
else: |
120 |
|
check = check + 1 |