Roberto Benitez wrote:
The following worked for me:
with a file object containing the following text: line one of test file
line two of test file
line three of test file
I was table to parse lines w/ following code: file="%s" % context.textfile
num=1
for line in file.split("\n"):
  print "LINE %s IS: %s" % (num,line)
  num+=1
return printed



result was as follows:
LINE 1 IS: line one of test file LINE 2 IS: line two of test file LINE 3 IS: line three of test file
Thanks a lot, that is very useful. Although I wonder why there is no more direct method to do this, this works well.

Cheers,
Eric
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to