Re: [ZIZope] Script Python

Fabrizio Reale <[email protected]>
Newsgroups gmane.comp.web.zope.italian
Message-ID <[email protected]>
Alle venerdì 16 novembre 2007, Nicola Palumbo ha scritto:
> Il giorno ven, 16/11/2007 alle 09.07 +0100, Fabrizio Reale ha scritto:
> > Alle venerdì 16 novembre 2007, Nicola Palumbo ha scritto:
> > > Salve a tutti,
> > > vorrei realizzare uno script python che mi consente di scrivere su un
> > > file, questo file è un oggetto di Zope e non un file del filesystem.
> > > Sono riuscito a leggere il contenuto (inserito tramite ZMI) ma non
> > > riesco a scriverci come posso fare è una cosa molto semplice ma sono da
> > > poco alle prese con python e zope
> >
> > Solo Zope o sono file di Plone?
> > Nel secondo caso mi pari si possa usare il metodo setFile.
> > Con i file di Zope non mi ricordo il metodo, ma basta che ti leggi la
> > classe.

> File di Zope, dove posso leggere la classe??

Sono andato a cercarla e ho trovato il metodo:
def update_data(data, content_type=None, size=None):
        """
        Updates the contents of the File with 'data'.

        The 'data' argument must be a string. If 'content_type' is not
        provided, then a content type will not be set. If size is not
        provided, the size of the file will be computed from 'data'.


Fabry




-- 
Fabrizio Reale                               [email protected]
Redomino S.r.l.                 Largo Valgioie 14 - 10146 Torino - Italy
Tel: +39 011 7499875 - Fax: +39 011 3716911     http://www.redomino.com/

_______________________________________________
Zope mailing list
[email protected]
http://lists.zope.it/cgi-bin/mailman/listinfo/zope
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.