[Tutor] readline() problem
Ron Alvarado
rha207 at worldnet.att.net
Wed Feb 11 17:25:18 EST 2004
Here's what I'm getting when I try readline(). What an I doing wrong?
>>> data = open('bData.csv', 'r')
>>> num = True
>>> while num != "":
data = data.readline()
print data
Part number Description Item Cost 1104 1105 1118
Traceback (most recent call last):
File "<pyshell#7>", line 2, in -toplevel-
data = data.readline()
AttributeError: 'str' object has no attribute 'readline'
>>>
More information about the Tutor
mailing list