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
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 -
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'
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 =