[Zope] Re: dynamically creating zip file, returning to user

Tres Seaver tseaver at palladion.com
Fri Jan 6 10:12:55 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tino Wildenhain wrote:
> John Toews schrieb:
> 
>>Thanks Tino, I'll definately give that a try too. The quick fix seemed
>>to be opening the file for read in binary mode... that should have been
>>obvious. Posting another dumb question to the list now. ;)
> 
> 
> no, dot use a regular file! Use the tempfile module!
> And dont reopen but seek to the start - f.seek(0)
> You just open it for "rw".

Don't forget the 'b' when doing zipfiles!


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDvoj3+gerLs4ltQ4RAvpXAJ0Zcs5oTulmzdEwPnJ4nRoe/v8DyACePGum
N0GbYQ63ky/MKtrSNHa1LA0=
=OIXo
-----END PGP SIGNATURE-----



More information about the Zope mailing list