Extracting a substring makes the for loop break in python
<p>I am having a lot of trouble with a text file given to me that I need to parse. This is my third attempt at parsing it (I tried both C and php which seem to fail in different ways).</p>

<p>I have this extremely simple code :</p>

<pre><code>    import fileinput

for line in fileinput.input(['basin_stclair.txt']):
    print line[0:64]
</code></pre>

<p>For some reason the code exits after the first print.</p>

<p>If I print the lines whole then it never stops but the lines are still combined. (If I only let the loop run for one iteration I get two lines(14 floats).</p>

<p>The text file looks like this(Several hundred lines like this one, 7 floats) :</p>

<p>1.749766    3.735660    0.294098    310.461737  0.000000    0.231367    0.230505</p>

<p>When I copy the entire text in kate it gets all jumbled and lines combine.</p>

<p>The text file was made using excell on a windows machine. (I'm working on a linux box).</p>

<p>Any ideas?</p>
