David Rock wrote:
I am trying to catch an exception from the csv module but it doesn't
seem to be generating a proper exception because I don't seem to be able
to catch it. Here is what I am doing:


for inputline in fileinput.input(args): try: input = csv.reader([inputline], escapechar='\\') except: print "ERROR", inputline


This is the traceback: Traceback (most recent call last): File "/usr/openv/local/bin/bpdbreport_test.py", line 539, in ? for line in input: _csv.Error: newline inside string

I'm suspicious of this - the traceback doesn't match the code you show. Is your program called bpdbreport_test.py? What is happening at line 539 of bpdbreport_test.py?


Kent

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to