gadfly error gadfly instance has no attribute 'execute'

bussiere maillist bussieremaillist at gmail.com
Fri Jun 2 10:57:30 EDT 2006


here is the error i've get :

Traceback (most recent call last):
  File "D:\Programmation\pitney\pitney.py", line 13, in ?
    connection.execute('create table personne(nom varchar)')
AttributeError: gadfly instance has no attribute 'execute'

i'am under windows and i still haven't found the error

here is my code :

import csv,gadfly,fileinput,glob, string, sys, os,unicodedata

print "que voulez vous faire ?\n"


fichA=raw_input("Entrez le nom du fichier a importer : ")
cr = csv.reader(open(fichA),delimiter=";")
connection = gadfly.gadfly()
connection.startup('pitney','D:\Programmation\pitney\')
cursor = connection.cursor()
connection.execute('create table personne(nom varchar)')
cursor.execute("insert into personne(nom) values('bussiere')")
connection.commit()
cursor.execute('select * from personne')
print cursor.fetchall()
compteur = 0
for row in  cr:
    print row[0],row[1]
compteur += 1

print "Dead Parrot"



regards Bussiere
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060602/63c59e1f/attachment.html>


More information about the Python-list mailing list