[Tutor] CSV file processing...

Spencer Parker inthefridge at gmail.com
Fri Mar 21 19:59:44 CET 2008


Okay...so I got it mostly working...it now dies with this trackback:

Traceback (most recent call last):
  File "./loadcsv.py", line 23, in ?
    co.execute("""
  File "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line 148, in
execute
    query = query % db.literal(args)

On Fri, Mar 21, 2008 at 11:54 AM, Kent Johnson <kent37 at tds.net> wrote:

> Spencer Parker wrote:
> > So if my long row is row two...how do I tell it to use row 2?
>
> csv_data = csv.reader(file('output.txt','r'))
> headers = csv_data.next() # Skip header row
> row = csv_data.next() # The row with data
>
> Kent
>



-- 
Spencer Parker
_______________________________________________________

"if you can't go to heaven, may you at least die in Ireland."

_______________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080321/1b8a9310/attachment.htm 


More information about the Tutor mailing list