Re: [Zope] Reading lines from a Zope File object

2005-07-12 Thread Chris Withers
J Cameron Cooper wrote: Yes, forgot that caveat. For large files, 'data' can return a Pdata, a list of strings. For small files, it returns a string. Always doing 'str' is a good idea. Well, there's a reason for PData ;-) str'ing a large file will use lots of memory... str'ing lots of large

[Zope] Reading lines from a Zope File object

2005-06-23 Thread John Poltorak
What function is used to read lines from a Zope File object using Python? Is there any example of this anywhere? Doing a search for 'python read zope object' is just too generic to find any python code to do this. -- John ___ Zope maillist -

Re: [Zope] Reading lines from a Zope File object

2005-06-23 Thread J Cameron Cooper
John Poltorak wrote: What function is used to read lines from a Zope File object using Python? Is there any example of this anywhere? Doing a search for 'python read zope object' is just too generic to find any python code to do this. You can get the main contents of a File with the 'data'

Re: [Zope] Reading lines from a Zope File object

2005-06-23 Thread J Cameron Cooper
Andy McKay wrote: J Cameron Cooper wrote: You can get the main contents of a File with the 'data' attribute. It returns a string. I think it actually returns an object (for large file support), if you want the data as a string you need to string it. So for small files: datastr =