Jacob S. wrote:

I assume that both you and Liam are using previous-er versions of python?
Now files are iterators by line and you can do this.

openFile = open("probe_pairs.txt","r")
indexesToRemove = []
for line in openFile:
    # [...]

My version of Python isn't *that* old (IIRC this works since 2.2, which is what I usually use), I'm just in the habit of using readlines(). I suppose that, in a case like this where the filesize is not insignificant, it *would* be worthwhile to take advantage of the file iterator to avoid having that fairly large list in-memory...


Jeff Shannon
Technician/Programmer
Credit International


_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Reply via email to