split problem if the delimiter is inside the text limiter

Tim Chase python.list at tim.thechases.com
Thu Mar 19 00:30:46 CET 2009

Bruno Desthuilliers wrote:
> Tim Chase a écrit :
>> (if your columns in your CSV happen to match the order of your INSERT 
>> statement, you can just use
>>   execute(sql, tuple(row))
> Or more simply:
>      cursor.execute(sql, row)

that's always annoyed me with the mxODBC drivers I've 
used....they require(d?) a tuple in this position, so I developed 
  this habit.  I think the OP hinted they were using postgres 
drivers which may be a bit kinder to the user.  (and don't get me 
started on mxODBC's failure to determine the data-type for 
parameters in subqueries, raising exceptions on perfectly valid 


More information about the Python-list mailing list