comparison iec1107.py @ 5:b686ad203c1e

Don't print the raw value AND the parsed ones.
author Daniel O'Connor <darius@dons.net.au>
date Wed, 20 Nov 2013 15:51:44 +1030
parents 10a16898903d
children 08b192a6e189
comparison
equal deleted inserted replaced
4:10a16898903d 5:b686ad203c1e
157 print 'Bad usage' 157 print 'Bad usage'
158 print '\t%s portname' % (sys.argv[0]) 158 print '\t%s portname' % (sys.argv[0])
159 sys.exit(1) 159 sys.exit(1)
160 160
161 res = IEC1107Reading(sys.argv[1]) 161 res = IEC1107Reading(sys.argv[1])
162 map(sys.stdout.write, res.rawreading)
163 print res 162 print res
163
164 if __name__ == '__main__': 164 if __name__ == '__main__':
165 main() 165 main()
166 166
167 # Meter number is 1288004 167 # Meter number is 1288004
168 # 1.8.0 is import 168 # 1.8.0 is import