Re: input file format

2011-08-09 Thread Steven D'Aprano
On Wed, 10 Aug 2011 01:00 pm Etay wrote: > Is there some simple way to skip over the lines I don't need, and then > inform Python about the format of the lines with the data I do need > within a loop? Yes. It's called "programming" :) f = open('some file') for line in f: if some_condition(li

input file format

2011-08-09 Thread Etay
Hi all, I am trying to write a Python script which will read the output file of a numerical model, and then copy some of that information into a new file in a new format. The output file of the numerical model is basically 54321 # number of points 1234 # number of time steps __a whole bunch of