zipfile

Jose Jiménez López <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Organization Fundación IAVANTE
Message-ID <1173269856.4971.8.camel@localhost>
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-PttKq6FmaWE8QMA/Cy+x5VaTQe2KTcn/@public.gmane.org 
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.

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.