I realize the original post is 9 years old (LOL!) but it was the only thing that Google threw up for the problem I encountered when converting a program from csv processing to flat file processing.

I ended up with;
=============== ===============

# Open the file
f = open(inputfile, "r") #
#
# Read the file and process the data
#
for row in f:...