[Zope] Reading and parsing a text file object

egf05 at doc.ic.ac.uk egf05 at doc.ic.ac.uk
Wed Jul 19 18:57:20 EDT 2006


I am new to Zope (but familiar with Python) and have a question.
I have a text file in  a folder and I would like to parse its content, and I
wanted to put the text in a string variable. I understand I can access the
content through file.data or better str(file.data).
However, the string I obtain has no carriage returns anymore, they are replaced
by a space. This is annoying because I cannot split the file line by line.

Is there a "trick" I do not know? Or is there a better way to parse the content
of a text file object? Any advice would be very appreciated.


More information about the Zope mailing list