Binary data handling ?

Bill Loren lorenb2 at
Thu Aug 28 16:01:20 CEST 2003

Hello ppl,

I'm having difficulties to accomplish some simple chores with binary data.
I'm having a string (?) which I received via an HTTP transactions which is a
binary file.
Problem is the webserver I'm communicating with injected a \x0D before every
and I need to remove those 0x0D characters from my buffer before saving it
to disk.

any ideas ?

I tried the following without any success:
string.replace("%c%c" % (13,10), "%c" % (10))
string.replace("\x0d\x0a", "\0x0a")


More information about the Python-list mailing list