3
f = open("MonitorsDB", "r")
4
out = open("MonitorsDBOut", "w")
8
for line in f.readlines():
9
if len(line.strip()) and not line.strip().startswith('#'):
10
values = map(lambda x: x.strip(), line.split(';'))
12
print "This line contains two few values\n%s" % line
13
manufacturer = values[0]
18
if len(manufacturer) == 0:
19
print "This line doesn't contain Manufacturer\t%s" % line
22
print "This line contains empty model\t%s" % line
24
if len(monId) == 0 or monId == "0":
25
print "This line contains empty monitor Id\n%s" % line
27
if len(vGh) == 0 or len(hGh) == 0:
28
print "This line contains wrong Gh\t%s" % line
30
if monIds.has_key(monId):
31
print "Two line have the same monitor Ids\n%s%s" % (monIds[monId], line)