> On October 28, 2009 8:33 PM, "ryles" wrote:
>
> > with io.BytesIO() as memio:
> > shutil.copyfileobj(f, memio)
> > zip = zipfile.ZipFile(file=memio)
> > # Can't use zip.extract(), because I want to ignore paths
> > # within archive.
> > src = zip.open(
On Oct 28, 8:33 pm, ryles wrote:
> As for why the bytesToRead calculation in ZipExtFile.read() results in
> a long, I've not yet looked at it closely.
Simple, actually:
In ZipExtFile.__init__():
self.bytes_read = 0L
In ZipExitFile.read():
bytesToRead = self.compress_size - self.bytes_
On Oct 23, 1:15 pm, "Moore, Mathew L" wrote:
> Hello all,
>
> A newbie here. I was wondering why the following fails on Python 2.6.2
> (r262:71605) on win32. Am I doing something inappropriate?
>
> Interestingly, it works in 3.1, but would like to also get it working in 2.6.
>
> Thanks in advan
> En Fri, 23 Oct 2009 14:15:33 -0300, Moore, Mathew L
>
> escribió:
>
> > with io.BytesIO() as memio:
> > shutil.copyfileobj(f, memio)
> > zip = zipfile.ZipFile(file=memio)
> > # Can't use zip.extract(), because I want to ignore paths
> > # within archive.
> >
En Fri, 23 Oct 2009 14:15:33 -0300, Moore, Mathew L
escribió:
with io.BytesIO() as memio:
shutil.copyfileobj(f, memio)
zip = zipfile.ZipFile(file=memio)
# Can't use zip.extract(), because I want to ignore paths
# within archive.
src = zip.open('unkn
Hello all,
A newbie here. I was wondering why the following fails on Python 2.6.2
(r262:71605) on win32. Am I doing something inappropriate?
Interestingly, it works in 3.1, but would like to also get it working in 2.6.
Thanks in advance,
--Matt
import io
import shutil
import tempfile
import