Code: Select all
hexArray = c_char*16
self.__hexLookup = hexArray(b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'A', b'B', b'C', b'D', b'E', b'F')Code: Select all
self.__hexLookup = hexArray(b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'A', b'B', b'C', b'D', b'E', b'F')
^
SyntaxError: invalid syntaxCode: Select all
str = ""
for i in range(5):
str += (self.__hexLookup[int(tagValue[i] / 16)]).decode()
str += (self.__hexLookup[int(tagValue[i] % 16)]).decode()But, if I try to print tagValue
itself I get: ctypes.LP_c_ubyte object at 0x4935d0
I am guessing the output is supposed to be a hex string. Unfortunately, the original author is no longer at Phidgets, and no one there is sure what the out pit should look like.
Any help replacing this with 2.5 compatible code would be greatly appreciated.