Am new to Python, and having difficulty with Error Messages I 'm using Python 3.1
And PyScripter as my editor I want to process a comma delimited file one line at a time and Interact with the fields within each line. I found this script when looking at the CVS module and loaded It into PyScripter, but get: Syntax Error: Invalid Syntax Cannot figure out why and Googleing for help doesn't help Any ideas? import csv, sys filename = "some.csv" reader = csv.reader(open(filename, "rb")) try: for row in reader: print (row) except csv.Error, e: sys.exit('file %s, line %d: %s' % (filename, reader.line_num, e)) thanks, Terry Green
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor