Stephan wrote: > Thank you all for these interesting examples and methods!
You're welcome. > Supposing I want to use DictReader to bring in the CSV lines and tie > them to field names, (again, with alternating lines having different > fields), should I use two two DictReaders as in Christopher's example > or is there a better way? For a clean design you would need not just two DictReader instances, but one DictReader for every two lines. However, with the current DictReader implementation, the following works, too: import csv import sys reader = csv.DictReader(sys.stdin) for record in reader: print record reader.fieldnames = None Peter -- http://mail.python.org/mailman/listinfo/python-list