Writing byte stream as jpeg format to disk

Navkirat Singh navkirats at gmail.com
Thu Aug 26 18:57:57 EDT 2010


On 27-Aug-2010, at 4:23 AM, Terry Reedy wrote:

> On 8/26/2010 5:28 PM, Navkirat Singh wrote:
> 
>>>>> b = b'asdf'
>>>>> type(b)
>> <class 'bytes'>
>>>>> s = b.split(':')
> 
> You are trying to split bytes with a string, which is impossible.
> Split bytes with bytes, strings with strings.
> 
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in<module>
>> TypeError: Type str doesn't support the buffer API
> 
> 
> -- 
> Terry Jan Reedy
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Thanks !



More information about the Python-list mailing list