David Perlman wrote: > Oh, except one problem: the csv.DictWriter lets you tell it what order > you want the columns output in. With your version, they just show up > in whatever order Python wants them.
That's not hard to fix: >>> fieldnames = "abca" >>> cols = [data[fn] for fn in fieldnames] >>> writer.writerows(zip(*cols)) 1,4,7,1 2,5,8,2 3,6,9,3 Peter _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor