Binary data handling ?
lorenb2 at bezeqint.net
Mon Sep 1 09:07:41 CEST 2003
if I use the 'wb' will it work on a unix system, too ?
----- Original Message -----
From: "Tim Roberts" <timr at probo.com>
To: <python-list at python.org>
Sent: Saturday, August 30, 2003 7:11 AM
Subject: Re: Binary data handling ?
> "Bill Loren" <lorenb2 at bezeqint.net> wrote:
> >I'm having difficulties to accomplish some simple chores with binary
> >I'm having a string (?) which I received via an HTTP transactions which
> >binary file.
> >Problem is the webserver I'm communicating with injected a \x0D before
> >and I need to remove those 0x0D characters from my buffer before saving
> >to disk.
> >any ideas ?
> I'll bet you real money that the problem is not in the web server. I'd
> wager that the string is correct when you receive it, but that you are
> writing it to file like this:
> On a Windows system, that'll turn all the LFs into CR-LFs. Use this
> - Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
More information about the Python-list