Re: Characters Being Misread

2008-07-15 Thread Michiel Overtoom
Victor wrote... import binascii binascii.unhexlify('\x0c') >TypeError: Odd-length string >What gives here? The function unhexlify() wants an even-length string. From the online help: >>> help(binascii.unhexlify) unhexlify(...) a2b_hex(hexstr) -> s; Binary data of hexadecimal repres

Characters Being Misread

2008-07-15 Thread Victor Subervi
Hi; Forgive multiple posts in one day: online very infrequently I'm having the darndest time trying to figure out how the character '\b0' is being read in "('\x0c')" >>> test = re.search('(?<=\\b)[0]', '\x0c0') >>> test.group(0) '0' >>> type('\x0c') >>> import binascii >>> binascii.unhexlify('\x0c