Reading all of the above this is the most simple i can come too. import MySQLdb
class Db: def __init__(self,server,user,password,database): self._db=MySQLdb.connect(server , user , password , database) self._db.autocommit(True) self.cursor=self._db.cursor() def excecute(self,cmd): self.cursor.execute(cmd) self.rowcount=int(self.cursor.rowcount) def close(self): self.cursor.close() self._db.close() def __del__(self): try: self.close() except: pass if __name__ == '__main__': gert=Db('localhost','root','******','gert') gert.excecute('select * from person') for row in gert.cursor: print row This must be the most simple it can get right ? PS i didn't understand the __getattr__ quit well but i thought it was just to overload the privies class -- http://mail.python.org/mailman/listinfo/python-list