Convert hexadecimal characters to ascii

Durand durand1 at gmail.com
Sat Nov 29 15:39:14 EST 2008


Hi,

I've got this weird problem where in some strings, parts of the string are in hexadecimal, or thats what I think they are. I'm not exactly sure...I get something like this: 's\x08 \x08Test!' from parsing a log file. From what I found on the internet, x08 is the backspace character but I'm still not sure.
Anyway, I need to clean up this string to get rid of any hexadecimal characters so that it just looks like 'Test!'. Are there any functions to do this?

Thanks =)



More information about the Python-list mailing list