Convert MAC to hex howto
johannes_graumann at web.de
Sun Oct 7 22:38:39 CEST 2012
Paul Rubin wrote:
> Johannes Graumann <johannes_graumann at web.de> writes:
>> hexcall = "\\x".join(hexcall).decode('string_escape')
> I think it's best not to mess with stuff like that. Convert to integers
> then convert back:
> mac = '00:08:9b:ce:f5:d4'
> hexcall = ''.join(chr(int(c,16)) for c in mac.split(':'))
Thanks to you as well!
More information about the Python-list