Daniel Crespo wrote: > Hi, I tried: ... > # Convert binary data into a string. > macaddr = '' > for intval in struct.unpack('BBBBBB', buffer): > if intval > 15: > replacestr = '0x' > else: > replacestr = 'x' > macaddr = ''.join([macaddr, hex(intval).replace(replacestr, '')])
Replace the above by: return '%02X' * 6 % struct.unpack('BBBBBB', buffer) (doesn't help with win98, though) -- -Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list