2009/6/6 Emile van Sebille <em...@fenx.com>: >> for f in files: >> print f >> csv.reader(open (f), delimiter=' ', quotechar='|') > > you open it here, but don't save a reference to the opened file. Try... > ff = csv.reader(open (f), delimiter=' ', quotechar='|')
<snip> > reader(...) > csv_reader = reader(iterable [, dialect='excel'] > [optional keyword args]) > for row in csv_reader: > process(row) If you are on windows you should open the file in binary mode. open(f, 'rb') Greets Sander _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor