I've written a little script to parse a csv file then use seach/replace
over a template to create a file for each line in the file. It pikes
out when I call the function that parses the csv (read_revs). If I
have inadvertantly left an extra comma or two in the comma field, it
gives an error that
Mostly I posted to try to find out more about the arguments being
passed to __init__, and why they'd be 13 one second and 1 the next.
I also was hoping to get a little more background on what is happening
under the hood of the csv function I've plagiarised. I haev read the
online python doco on
That's great, but it seems like a lot of work just to read in
everything. Take a look at the sample that I did with the
interpreter...
First, X is a simulated input line...
---
x = "
param1,param2,param3,param4,param5,param6,param7,param8,param9,comments
blah , blah, test"
---
Ok, so just like you
googleboy wrote:
> I've written a little script to parse a csv file then use seach/replace
> over a template to create a file for each line in the file. It pikes
> out when I call the function that parses the csv (read_revs). If I
> have inadvertantly left an extra comma or two in the comma field
it looks like your problem is in this line:
reviews = [Review(*[field.strip() for field in row]) for row in reader]
ouch! split that up a bit so we can understand what the heck you are
trying to do here. Also, it appears the whole thing is in these [ ] ?
why?
--
http://mail.python.org/mailman/li
d'oh I'm an idiot... you are making a 'list' object.
--
http://mail.python.org/mailman/listinfo/python-list