[Zope] Documentation

Dieter Maurer dieter@handshake.de
Wed, 15 Jan 2003 23:41:37 +0100


Jerry Westrick wrote at 2003-1-15 12:17 +0100:
 > I'm relatively new to zope and also relatively new to python.
 > 
 > I'm having a had time doing the simplest things in my zope/python
 > environment....
 > 
 > As example (the latest of a long line of problems...), how do I get the
 > contents on a Zope file.  how do I access the file.  I would like to
 > read the file line by line in a for-loop.  
It depends what type of file it is.

"OFS.Image.File" objects give access to their content through "str".
Therefore, you could use:

	   for line in str(file).split('\n'):
	     ... line processing ...

If your file is quite large (in the order of MB), then this is
not a good approach, though.

 > Now, giving me the answer to theese questions would be helpfull, but...
 > 
 > Telling me where to find the answer would probably be more helpfull!
You did read the Zope Book (2.6 Edition)?

Have a look at 

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

My "DocFinder" product may be very helpful to find out what methods
an object provides:

  <http://www.dieter.handshake.de/pyprojects/zope>



Dieter