How to represent a sequence of raw bytes

Steven Woody narkewoody at gmail.com
Mon Dec 22 10:11:18 CET 2008


On Mon, Dec 22, 2008 at 4:35 PM, James Mills
<prologic at shortcircuit.net.au> wrote:
> On Mon, Dec 22, 2008 at 4:56 PM, Steven Woody <narkewoody at gmail.com> wrote:
>> I thing "\x11\x22\x33" in python is not the {0x11, 0x22, 0x33} in C.
>> Since, a string in python is immutable, I can _not_ do something like:
>>  b[1] = "\x55".
>>
>> And, how about char buf[200] in my original question?  The intension
>> is to allocate 200 undefined bytes in memory. Thanks.
>
> Steven, one piece of advice.
>
> Python is not C.
>
> Thank.
>
> cheers
> James
>

Ok, I will study all your advices. I think I may find my way when
doing real tasks.



More information about the Python-list mailing list