I'm not familiar with the Zope side of the world at all, so this may be
> However, if one tries to consume a NamedTemporaryFile and then open its
> generated blob before closing the tempfile, Windows complains:
> >>>> import ZODB.blob, tempfile
> >>>> f = tempfile.NamedTemporaryFile()
> >>>> b = ZODB.blob.Blob()
> >>>> b.consumeFile(f.name)
> >>>> b.open('r')
> > Traceback (innermost last):
> > ...
> > IOError: [Errno 13] Permission denied:
> unless we use some non-portable win32 code to allow writing and
> reading to the same file simultaneously.
I'm not sure exactly what you mean by "simultaneously", but assuming you
just need the ability to read and write to a file, you already can. Does
this behaviour help?
>>> import tempfile
>>> f = tempfile.NamedTemporaryFile()
I can easily see it might not - as soon as the file is closed you have
(obviously) lost it.
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -