[Zope] Accessing File Object Contents in Python Script

Farrell, Troy troy.farrell@wcg.com
Wed, 3 Oct 2001 11:36:39 -0500


Did you try o.data?

> -----Original Message-----
> From: complaw@hal-pc.org [mailto:complaw@hal-pc.org]
> Sent: Wednesday, October 03, 2001 11:34 AM
> To: zope@zope.org
> Subject: [Zope] Accessing File Object Contents in Python Script
> 
> 
> Does anyone know how to access the contents of a File object 
> (i.e., the file
> itself) from within a python script.
> 
> o.file or o.contents doesn't work.
> 
> The idea is to be able to run the file contents through some 
> post-loading
> processing on the contents of the file.
> 
> Incidentally, the Zope API only has getContentType() and 
> getSize(), not the
> document itself.
> 
> If you happen to know where in the Zope source this might be 
> found, I'd be happy
> to know.  grepping "file" is a slow and arduous way to go.
> 
> Thanks everyone,
> 
> Ron
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>