On 10/07/07, bhaaluu <[EMAIL PROTECTED]> wrote: > >>> file.readlines() > Traceback (most recent call last): > File "<stdin>", line 1, in ? > AttributeError: 'str' object has no attribute 'readlines'
This error here is caused by this earlier statement: > >>> file=open('text.txt').read() 'file' is now a string, not a file-like object. This also causes the behaviour you get when iterating 'for line in file'... -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor