27 Jul
2005
27 Jul
'05
11:54 a.m.
Well, not exactly - just a way to separate access to data from everything else in the product. Maybe a separate class that needs the connection as argument and that just returns the data I need in appropriate data structures by calling class methods. class DataModel (object): def __init__ (self, conn): self.conn = conn self.sqlFetchSomething = SQL (.....) def fetchSomething (self): return self.sqlFetchSomething This is really simple, but I think it gives the idea. Obviously I'd like to perform various operation at the data level, for example return a list of lists for reportlab tables and so on. TIA, ngw --------------------------------- Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3