RE: reading zipfile; problem using raw buffer

2011-07-26 Thread Sells, Fred
Thanks all, adding the 'rb' and 'wb' solved that test case. The reason I read the file "the hard way" is that I'm testing why I cannot unzip a buffer passed in a file upload using django. While not actually using a file, pointing out the need for the binary option gave me the clue I needed to up

Re: reading zipfile; problem using raw buffer

2011-07-26 Thread Peter Otten
Sells, Fred wrote: > I'm tring to unzip a buffer that is uploaded to django/python. I can > unzip the file in batch mode just fine, but when I get the buffer I get > a "BadZipfile exception. I wrote this snippet to try to isolate the > issue but I don't understand what's going on. I'm guessing

Re: reading zipfile; problem using raw buffer

2011-07-26 Thread Billy Mays
On 07/26/2011 08:42 AM, Sells, Fred wrote: I'm tring to unzip a buffer that is uploaded to django/python. I can unzip the file in batch mode just fine, but when I get the buffer I get a "BadZipfile exception. I wrote this snippet to try to isolate the issue but I don't understand what's going o