The problem is with this: > lines = lines.append(inLine)
The append method of a list modifies the list in-place, it doesn't return a copy of the list with the new element appended. In fact, it returns None, which it then attaches the label 'lines' to, so the next iteration through it tries to call None.append... Replace the line with: lines.append(inLine) -- http://mail.python.org/mailman/listinfo/python-list