[CPS-devel] zipfile

Jose Jiménez López jose.jimenez at iavante.es
Wed Mar 7 13:17:36 CET 2007


Hello everybody,

I am creating a new portal_type for my cps portal. This type will handle
a zip file uploaded by the user. I have created the type correctly, and
assigned as alias of "create_do" an script that will do some operations
with the zip file. In this script, in the datamodel, i have a field
called "'ziparchiveuploader", it contains this: <File at
ziparchiveuploader>. 

I want to use the python module "zipfile". When i try to open the file
with:

file = zipfile.ZipFile(datamodel['ziparchiveuploader'], 'r')

it returns me this error:

*** AttributeError: seek

I have tried  to open the same zip file with a script in console and its
ok.

Somebody can help me?

Thanks.

Jose Jiménez López
Becario de Sistemas
FUNDACIÓN IAVANTE 
jose.jimenez at iavantefundacion.com 
Tel. 958 00 22 63 

 

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene
        información confidencial exclusivamente dirigida a su(s)
  destinatario(s). Toda copia o divulgación deberá ser autorizada por
                                IAVANTE.

    This e-mail and any attachments are confidential and exclusively
 directed to its adressee(s). Any copy or distribution will have to be
                         authorized by IAVANTE.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nuxeo.com/pipermail/cps-devel/attachments/20070307/ee4f4ebb/attachment.html



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.