2 Jan
2002
2 Jan
'02
8:40 p.m.
Ronald L. Chichester writes:
I have a text file loaded into Zope (2-4-3) as a File object. I want to "read" the file and do something with the information therein. Ideally, I would want to go through each line of data using a python script. However, the following doesn't work...
import string
lines = context.myFileObject.data
for line in lines: # do something "File.data" is not a sequence of lines!
Use: "lines= string.split(str(context.myFileObject.data),'\n')". Dieter