Reading lines from a Zope File object
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
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' attribute. It returns a string. You can ask a string 'splitlines' among other methods: http://python.org/doc/lib/string-methods.html You may also be interested in 'split'. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com
participants (2)
-
J Cameron Cooper -
John Poltorak