Help!, transform octet-stream data to binary?

Fredrik Lundh effbot at
Fri Mar 3 22:11:28 CET 2000

Shichang Zhao <shichang at> wrote:
> After uploading a word or .zip file via Web browser, I got odctet-stream
> data. How do I transform the data back to binary so that I can save it,
> say, as word documet or .zip files. Please help!

I'm probably missing the point here, but an octet-stream
is just a fancy name for a binary file.

if you're talking about "content-encoding" rather than
"content-type", use the "base64" or "uu" module (see
the library reference for details).


<!-- (the eff-bot guide to) the standard python library:

More information about the Python-list mailing list