Character set woes with binary data

Ene EneUran at yahoo.com
Sun Apr 1 15:21:11 EDT 2007


On Apr 1, 11:44 am, John Nagle <n... at animats.com> wrote:
> Michael B. Trausch wrote:
> > In short:  How do I create a string that contains raw binary content
> > without Python caring?  Is that possible?
>
>     Given where we're now at with strings in Python, Python should
> really have a "byte" type and a way to deal with arrays of bytes,
> independent of the string operators.
>
>     Efficient handling of lists of bytes would do it.
>
>                                 John Nagle

Python has a module base64 that allows you to handle binary data as a
string.




More information about the Python-list mailing list