<html>
one additional change might get quite some more speed.<br><br>
def filterfile2(inname, outname):<br>
    localint = int<br>
    out = file(outname, 'w')<br>
    for line in file(inname):<br>
        x, y, z = line.split()<br>
        sum = localint(x) +
localint(y) + localint(z)<br>
<font color="#0000FF"><b>        print
>>out, line, sum<br><br>
</b></font>ps: i'm new to python and have just fallen in love with the
language. 3 cheers to everyone who's a part of the team including all the
people in this group who are very helpful.<br><br>
<br>
At 04:07 PM 8/7/02 +0000, you wrote:<br>
<blockquote type=cite class=cite cite>nnes wrote:<br><br>
def filterfile2(inname, outname):<br>
    localint = int<br>
    out = file(outname, 'w')<br>
    for line in file(inname):<br>
        x, y, z = line.split()<br>
        sum = localint(x) +
localint(y) + localint(z)<br>
        newstr = ' '.join((x, y, z,
sum))<br>
        out.write(newstr +
'\n')<br><br>
i don't have a 7MB file ready to test these on, but it'd be interesting
to see the differences.</blockquote>
<x-sigsep><p></x-sigsep>
<hr>
MERRILY MERRILY MERRILY MERRILY Life is but a dream. <br>
</html>