<DIV>
<DIV>Well, not exactly - just a way to separate access to data from everything else in the product.</DIV>
<DIV>Maybe a separate class that needs the connection as&nbsp;argument and that just returns the data I need in appropriate data structures by calling class methods.</DIV>
<DIV>&nbsp;</DIV>
<DIV>class DataModel (object):</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; def __init__ (self, conn):</DIV>
<DIV>&nbsp;&nbsp;&nbsp; self.conn = conn</DIV>
<DIV>&nbsp;&nbsp;&nbsp; self.sqlFetchSomething = SQL (.....)</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; def fetchSomething (self):</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return self.sqlFetchSomething</DIV>
<DIV>&nbsp;</DIV>
<DIV>This is really simple, but I think it gives the idea.</DIV>
<DIV>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.</DIV>
<DIV>&nbsp;</DIV>
<DIV>TIA,</DIV>
<DIV>&nbsp; ngw</DIV></DIV><p>
                <hr size=1><font face="Arial" size="2"><a href="http://us.rd.yahoo.com/mail_it/taglines/*http://it.mail.yahoo.com"><b>Yahoo! Mail</b></a>: gratis 1GB per i messaggi, antispam, antivirus, POP3</font>