> >>> class reg(object): > ... def __init__(self, cursor, registro): > ... for (attr, val) in zip((d[0] for d in cursor.description), > registro) : > ... setattr(self, attr, val) > > >>> for row in cursor.fetchall() : > ... r = reg(cursor, row) > ... print r.CosCPrd, r.CosCAno, r.CosCMes, r.CosCImpSis, r.CosCUsr >
WOW!!! That works beautifully! Many many thanks! Regards, Serdar
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor