comparison adslstats.py @ 7:98d351a87043

merge
author Daniel O'Connor <darius@dons.net.au>
date Sat, 08 Feb 2014 09:21:57 +1030
parents 671e66da2cb9 3748cec0e322
children e69ad89061dc
comparison
equal deleted inserted replaced
6:671e66da2cb9 7:98d351a87043
87 Noise Margin - Up: %.1f dB, Down %.1f dB 87 Noise Margin - Up: %.1f dB, Down %.1f dB
88 Attenuation - Up: %.1f dB, Down %.1f dB""" % (self.upstream, self.downstream, 88 Attenuation - Up: %.1f dB, Down %.1f dB""" % (self.upstream, self.downstream,
89 self.nmup, self.nmdown, 89 self.nmup, self.nmdown,
90 self.attenup, self.attendown) 90 self.attenup, self.attendown)
91 91
92 def cleannum(s):
93 s1 = matchnum.match(s).groups()[0]
94 try:
95 return int(s1)
96 except ValueError:
97 return float(s1)
98
99 def getstats(f): 92 def getstats(f):
100 s = BeautifulSoup(f) 93 s = BeautifulSoup(f)
101 a = s.findAll('tr') 94 a = s.findAll('tr')
102 95
103 for i in statsdict: 96 for i in statsdict: