[Zope] Re: Parsing a file through a Python script
Dylan Reinhardt
zope at dylanreinhardt.com
Sun Nov 30 11:07:07 EST 2003
On Sun, 2003-11-30 at 07:25, Pierre Godefroy wrote:
> The issue is, I would like to work on a very big file and there may be
> problems with this. I would like to to access the file as it is already
> stored in the ZODB.
Well...
1. Don't serve large stuff from ZODB if you can avoid it.
2. If you want to parse *any* ZODB content, do this:
---
data = getattr(context, my_obj_name)
for line in data.readlines():
# do stuff
---
HTH,
Dylan
More information about the Zope
mailing list