On Mon, 16 May 2011 03:57:49 -0700, J wrote: > Most of the fields are separated by > spaces except for couple of them which I am processing with AWK > (removing "<G_" from the string for example). So in essence what I want > to do is evaluate each line in the log file and break them down into > fields which I can call individually and write them to a new log file > (for example selecting only fields 1, 2 and 3).
fields = line.split(' ') output.write(fields[1] + ' ') output.write(fields[2] + ' ') output.write(fields[3] + '\n') -- Steven -- http://mail.python.org/mailman/listinfo/python-list