[Csv] Test case

Skip Montanaro skip at pobox.com
Fri Jan 21 03:31:59 CET 2005


Here's a test script for the problem I described earlier:

    #!/usr/bin/env python

    import csv
    import os

    row = ["sub\rject:","0","1"]

    writer = csv.writer(open("tmp.csv", "wb"))
    writer.writerow(row)
    del writer
    reader = csv.reader(open("tmp.csv", "rb"))
    for row in reader:
        try:
            print row
        except csv.Error, msg:
            print msg
    del reader
    os.remove("tmp.csv")

I cvs up'd my Python source and confirmed that the problem is fixed there.
It's a problem in 2.3 and 2.4 though.  Any chance this can be fixed in time
for 2.3.5?

Skip


More information about the Csv mailing list