[EMAIL PROTECTED] wrote:
> mac_string = '001485e55503'  (This is the mac address of a computer.)
> Since the MAC adddress are hexadecimal, how should I go about it here.
> 
> Please help, every help is appreciated. Thanks

I could not quite understand what you are trying to achieve, but
it appears that you want to convert a character strings of hexadecimal
characters into a byte string with the same bytes. I recommend this:

py> import binascii
py> binascii.a2b_hex("001485e55503")
'\x00\x14\x85\xe5U\x03'

Of course, if the string is fixed, you could just as well use the
result string (i.e. '\x00\x14\x85\xe5U\x03') directly.

Regards,
Martin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to