Re: [Zope-dev] FileUpload and blob on Windows

2008-01-30 Thread Dieter Maurer
Leonardo Rochael wrote at 2008-1-27 22:29 -0800: ... Closing the NamedTemporaryFile after consuming it and before opening the blob makes the matters worse, since Windows removes the file from under Blob *after* it has been consumed, so we'll have to think of a different strategy for consuming

RE: [Zope-dev] FileUpload and blob on Windows

2008-01-28 Thread Mark Hammond
Hi Leo, I'm not familiar with the Zope side of the world at all, so this may be completely useless... 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 =

RE: [Zope-dev] FileUpload and blob on Windows

2008-01-28 Thread Leonardo Rochael
Hi Mark, Mark Hammond-3 wrote: [...] 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.

Re: [Zope-dev] FileUpload and blob on Windows

2008-01-28 Thread Christian Theune
Hi, Leonardo Rochael schrieb: I should've been clearer, I meant reading and writing at the same time from 2 different file handles. NamedTemporaryFile has the added complication of removing the file from under 'blob' when it's closed, so even if I don't try to open the blob after consuming